Quantcast

Re: Fork(), Waitpid()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fork(), Waitpid()

Joost Meijles
Hi Miquel, Drew, and others,

First thanks for your responses. The problem seems to be (indeed) that the
pid is not a child of the parent (or running thread). I have exactly the
same problem as described in this post:
http://lists.debian.org/debian-glibc/2004/02/msg00212.html . In this post it
is written that it "should" work with NPTL and Linux version 2.6. As far as
I know, this is the case on the Gumstix, when looking in the menuconfig I
see that NPTL is supported, and when verifying the version of Linux on my
Gumstix I have version 2.6.18gum.

At the moment I don't know how to solve my problem. Does anyone know if the
Gumstix is really using NPTL threads (I read in this link:
http://www.busybox.net/lists/buildroot/2007-February/002028.html, that no
support for NPTL is available currently on ARM)?
Does the version of Linux (2.6.18gum) differ from the other 2.6 Linux
versions?

Thanks again.


Kind regards,

Joost




>From: Miguel Pincheira Caro <[hidden email]>
>Reply-To: "General mailing list for gumstix users."
><[hidden email]>
>To: "General mailing list for gumstix users."
><[hidden email]>
>Subject: Re: [Gumstix-users] Fork(), Waitpid()
>Date: Mon, 14 May 2007 12:55:37 -0400
>
>Hi .
> > int pid = -2;
> >
>is this line outside the main? . Cause if the declaration is inside the
>main, the start() routine will not have the value of pid, and as far a I
>know, the ECHILD error happends when the pid on waitpid() is not a child
>of the parent. Also happends for one´s own child, if the action for
>SIGCHLD is set to SIG_IGN.
>
>Greetings
>Miguel
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>gumstix-users mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/gumstix-users

_________________________________________________________________
In 2 tellen een GRATIS online foto dagboek http://spaces.live.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fork(), Waitpid()

Joost Meijles
Hi,

I managed to get it working by first creating the thread and next making the
thread to fork the process. In this way the pid is the child of the parent
(thread) process.

Thanks again people, via your responses I came to the solution.

Kind regards,

Joost


>From: "Joost Meijles" <[hidden email]>
>Reply-To: "General mailing list for gumstix users."
><[hidden email]>
>To: [hidden email]
>Subject: Re: [Gumstix-users] Fork(), Waitpid()
>Date: Tue, 15 May 2007 08:52:32 +0000
>
>Hi Miquel, Drew, and others,
>
>First thanks for your responses. The problem seems to be (indeed) that the
>pid is not a child of the parent (or running thread). I have exactly the
>same problem as described in this post:
>http://lists.debian.org/debian-glibc/2004/02/msg00212.html . In this post
>it
>is written that it "should" work with NPTL and Linux version 2.6. As far as
>I know, this is the case on the Gumstix, when looking in the menuconfig I
>see that NPTL is supported, and when verifying the version of Linux on my
>Gumstix I have version 2.6.18gum.
>
>At the moment I don't know how to solve my problem. Does anyone know if the
>Gumstix is really using NPTL threads (I read in this link:
>http://www.busybox.net/lists/buildroot/2007-February/002028.html, that no
>support for NPTL is available currently on ARM)?
>Does the version of Linux (2.6.18gum) differ from the other 2.6 Linux
>versions?
>
>Thanks again.
>
>
>Kind regards,
>
>Joost
>
>
>
>
> >From: Miguel Pincheira Caro <[hidden email]>
> >Reply-To: "General mailing list for gumstix users."
> ><[hidden email]>
> >To: "General mailing list for gumstix users."
> ><[hidden email]>
> >Subject: Re: [Gumstix-users] Fork(), Waitpid()
> >Date: Mon, 14 May 2007 12:55:37 -0400
> >
> >Hi .
> > > int pid = -2;
> > >
> >is this line outside the main? . Cause if the declaration is inside the
> >main, the start() routine will not have the value of pid, and as far a I
> >know, the ECHILD error happends when the pid on waitpid() is not a child
> >of the parent. Also happends for one´s own child, if the action for
> >SIGCHLD is set to SIG_IGN.
> >
> >Greetings
> >Miguel
> >
> >-------------------------------------------------------------------------
> >This SF.net email is sponsored by DB2 Express
> >Download DB2 Express C - the FREE version of DB2 express and take
> >control of your XML. No limits. Just data. Click to get it now.
> >http://sourceforge.net/powerbar/db2/
> >_______________________________________________
> >gumstix-users mailing list
> >[hidden email]
> >https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>_________________________________________________________________
>In 2 tellen een GRATIS online foto dagboek http://spaces.live.com/
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>gumstix-users mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/gumstix-users

_________________________________________________________________
Meer ruimte nodig? Maak nu je eigen Space http://spaces.msn.nl/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...