https://bugzilla.novell.com/show_bug.cgi?id=301675 Summary: ionice does not check execvp return code Product: openSUSE 10.2 Version: Final Platform: i686 OS/Version: openSUSE 10.2 Status: NEW Severity: Minor Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: mail@bernhard-voelker.de QAContact: qa@suse.de Found By: Other I accidently forgot the option -p to change the io priority of a process: $ ionice -p 7 12345 instead of $ ionice -p 7 -p 12345 No error message came up, but the ionice value did not change. I started with strace again and found the reason: .. ioprio_set(0x1, 0, 0x4007) = 0 .. execve("/home/berny/bin/12345", ["12345"], [/* 76 vars */]) = -1 ENOENT execve("/usr/local/bin/12345", ["12345"], [/* 76 vars */]) = -1 ENOENT execve("/usr/bin/12345", ["12345"], [/* 76 vars */]) = -1 ENOENT .. execve("./12345", ["12345"], [/* 76 vars */]) = -1 ENOENT exit_group(0) = ? For I forgot the -p option, the tool tried to start a programm with name "12345". That's correct so far, but no error message came up worrying about the program not being executed. According to the patch "util-linux-2.12q-ionice.diff" of the src-rpm, the mistake is in the file "util-linux-2.12q/sys-utils/ionice.c": + } else { + if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) + perror("ioprio_set"); + + if (argv[optind]) + execvp(argv[optind], &argv[optind]); + } + + return 0; execvp returns because it can't find the proggy "12345", only followed by return 0. Another perror("execvp") would do. Unfortunately, I'm not deep into code contribution to openSuSE, but this should help so far ... Nonetheless a {io}nice tool ;-) Have a nice day, Berny -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.