kioexec --tempfiles does_not_exist /tmp/foo
Used to exit with code 0, now it exits with code -1.
Found by a unittest that will soon be pushed as part of D28020.
Details
Details
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 23718 Build 23736: arc lint + arc unit
Comment Actions
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.
EDIT:
So, IIUC, fix exitcode from kioexec:
- when executable doesn't exist (and --tempfiles is set)
- when executable exists and it exited with exit code != 0