D28060: Fix exitcode from kioexec when executable doesn't exist (and --tempfiles is set)

Ahmad Samir noreply at phabricator.kde.org
Sun Mar 15 16:26:13 GMT 2020


ahmadsamir added a comment.


  I tested it; before applying the diff:
  
    $ /usr/lib64/libexec/kf5/kioexec --tempfiles does_not_exist /tmp/foo
    command= "does_not_exist" args= ("does_not_exist", "/tmp/foo")
    EXEC "does_not_exist /tmp/foo"
    EXEC done
    $ echo $?
    0
  
  
  
    $ /usr/lib64/libexec/kf5/kioexec --tempfiles ls /tmp/foo
    command= "ls" args= ("ls", "/tmp/foo")
    EXEC "/usr/bin/ls /tmp/foo"
    /usr/bin/ls: cannot access '/tmp/foo': No such file or directory
    EXEC done
    $ echo $?
    0
  
  with the diff:
  
    $ bin/kioexec --tempfiles does_not_exist /tmp/foo
    command= "does_not_exist" args= ("does_not_exist", "/tmp/foo")
    EXEC "does_not_exist /tmp/foo"
    EXEC done
    $ echo $?
    254
  
  
  
    $ building-dir/bin/kioexec --tempfiles ls /tmp/foo
    command= "ls" args= ("ls", "/tmp/foo")
    EXEC "/usr/bin/ls /tmp/foo"
    /usr/bin/ls: cannot access '/tmp/foo': No such file or directory
    EXEC done
    $ echo $?
    2
  
  so the patch works.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D28060

To: dfaure, apol, davidedmundson, elvisangelaccio
Cc: ahmadsamir, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200315/77205e5b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list