[9fans] thread(2) man page - Plan9

This is a discussion on [9fans] thread(2) man page - Plan9 ; Hi, just to state it. We have int as return type for procexecl, procexec in the thread(2) man page and void in /sys/src/libthread/exec.c Regards...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] thread(2) man page

  1. [9fans] thread(2) man page

    Hi,

    just to state it. We have int as return type for procexecl, procexec
    in the thread(2) man page and void in /sys/src/libthread/exec.c

    Regards


  2. Re: [9fans] thread(2) man page

    > just to state it. We have int as return type for procexecl, procexec
    > in the thread(2) man page and void in /sys/src/libthread/exec.c


    If it returns at all, there was an error. If it doesn't return, there
    may or may not be an error, but you won't see it.

    Exec() probably has the int return value for historical reasons. I've
    never seen code test for it. What you see is:

    exec(...);
    sysfatal("something went badly wrong: %r");

    Sape


  3. Re: [9fans] thread(2) man page

    Sape Mullender wrote:
    > Exec() probably has the int return value for historical reasons.


    It was a natural consequence of using common code for (almost)
    all error returns in the system library.

+ Reply to Thread