Trouble with waitpid and Rust

Imre Vadász imrevdsz at gmail.com
Mon Jul 10 08:07:21 PDT 2017


Hi,
Did you verify that the child isn't just exiting before the parent calls
wait(), and getting reaped by a signal handler for SIGCHLD? This should be
easy to verify by running the binary with ktrace. In that case getting
ECHILD from waitpid() would be perfectly fine and could be treated as
success.
Regards, Imre

On Monday, July 10, 2017, Michael Neumann <mneumann at ntecs.de> wrote:

>
>
> On 07/10/17 15:40, Michael Neumann wrote:
> > Hi,
> >
> > I am trying to port some Rust libraries to DragonFly, specifically the
> > [nix] crate to access UN*X APIs from Rust.
>
> I think it's related to the problems that can occur when fork()ing a
> multi-threaded program, as described here:
>
>         http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-
> before-using-them
>
> Furthermore, I think this is similar to the "cargo" issue I am seeing,
> when running multi-threaded (it is forking and execve "rustc" and
> probably doing something in between... sometimes it hangs).
>
>
> Regards,
>
>   Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20170710/7ba7e67e/attachment-0003.htm>


More information about the Kernel mailing list