lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [OT] 'volatile' in userspace
>
> What's wrong with _exit(exec() == -1 ? 0 : errno);
> and picking up the status with wait(2) ?
>
The exec'd application may return regular error codes, which would
interfere. IIRC /usr/sbin/useradd has different exit codes depending on
what failed (providing some option, failure to create account, failure to
create home dir, etc.). Now if you exit(errno) instead, you have an
overlap.
And your code is somewhat wrong. Given that exec() would stand for
execve(someprogram_and_args_here), if it returned -1 you would return 0,
indicating success. Can't be. And if exec() does not return -1, which it
never should, you return errno, which never reaches anyone.


Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 09:51    [W:1.822 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site