Re: crash if fork(2) from another thread

2008-09-30 Thread Hirokazu Yamamoto
>>I also confirmed previous code worked fine with Cygwin 1.7. > >>But attached code hangs on Cygwin 1.7. (Actually this is what > >>test_3_join_in_forked_from_thread is doing) > > > >I can duplicate this. I'll investigate it as I have time. > > It should be fixed in the latest snapshot. Thanks, I

Re: crash if fork(2) from another thread

2008-09-29 Thread Christopher Faylor
On Mon, Sep 29, 2008 at 11:04:32PM -0400, Christopher Faylor wrote: >On Mon, Sep 29, 2008 at 09:16:32PM -0400, Christopher Faylor wrote: >>On Mon, Sep 29, 2008 at 11:42:32PM +0900, Hirokazu Yamamoto wrote: >>>I also confirmed previous code worked fine with Cygwin 1.7. >>>But attached code hangs on

Re: crash if fork(2) from another thread

2008-09-29 Thread Christopher Faylor
On Mon, Sep 29, 2008 at 09:16:32PM -0400, Christopher Faylor wrote: >On Mon, Sep 29, 2008 at 11:42:32PM +0900, Hirokazu Yamamoto wrote: >>I also confirmed previous code worked fine with Cygwin 1.7. >>But attached code hangs on Cygwin 1.7. (Actually this is what >>test_3_join_in_forked_from_thread i

Re: crash if fork(2) from another thread

2008-09-29 Thread Christopher Faylor
On Mon, Sep 29, 2008 at 11:42:32PM +0900, Hirokazu Yamamoto wrote: >I also confirmed previous code worked fine with Cygwin 1.7. >But attached code hangs on Cygwin 1.7. (Actually this is what >test_3_join_in_forked_from_thread is doing) I can duplicate this. I'll investigate it as I have time. cg

Re: crash if fork(2) from another thread

2008-09-29 Thread Hirokazu Yamamoto
> You still didn't explain what "crash" means, that was why I pointed you > at a web page which goes to some effort in trying to make it clear that > you should be descriptive when reporting problems. When I run ./main.exe $ ./main thread_func parent process (child pid = 1320) 14827 [main] main

Re: crash if fork(2) from another thread

2008-09-29 Thread Christopher Faylor
On Sun, Sep 28, 2008 at 08:53:55PM +0900, Hirokazu Yamamoto wrote: >cgf wrote: >>Your test case worked fine for me with Cygwin 1.7.x. I don't have a >>copy of 1.5.x handy to test. >> >>"crash" is an imprecise term. You need to read >>http://cygwin.com/problems.html. > >I'll attach the result of "

Re: crash if fork(2) from another thread

2008-09-29 Thread Christopher Faylor
On Sun, Sep 28, 2008 at 09:50:43AM +0200, Spiro Trikaliotis wrote: >* On Sat, Sep 27, 2008 at 11:30:13PM -0400 Christopher Faylor wrote: >>On Sun, Sep 28, 2008 at 11:16:21AM +0900, Hirokazu Yamamoto wrote: >>># I've post mail, but it didn't show up in >>>http://www.nabble.com/Cygwin-f12165.html. #

Re: crash if fork(2) from another thread

2008-09-29 Thread Hirokazu Yamamoto
>Your test case worked fine for me with Cygwin 1.7.x. I don't have a >copy of 1.5.x handy to test. > >> I don't see any reason why this shouldn't be allowed. You should > >> be able to do anything you want in a child process. > >I do not think that is true. As per > >

Re: crash if fork(2) from another thread

2008-09-28 Thread Christopher Faylor
On Sun, Sep 28, 2008 at 05:49:30PM +0200, V??clav Haisman wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA256 > >Christopher Faylor wrote, On 28.9.2008 17:25: >> On Sun, Sep 28, 2008 at 09:32:39AM +0200, V??clav Haisman wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA256 >>> >>> Hir

Re: crash if fork(2) from another thread

2008-09-28 Thread Václav Haisman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Christopher Faylor wrote, On 28.9.2008 17:25: > On Sun, Sep 28, 2008 at 09:32:39AM +0200, V??clav Haisman wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256 >> >> Hirokazu Yamamoto wrote, On 28.9.2008 4:16: >>> # I've post mail, but it didn

Re: crash if fork(2) from another thread

2008-09-28 Thread Christopher Faylor
On Sun, Sep 28, 2008 at 09:32:39AM +0200, V??clav Haisman wrote: >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA256 > >Hirokazu Yamamoto wrote, On 28.9.2008 4:16: >> # I've post mail, but it didn't show up in >> http://www.nabble.com/Cygwin-f12165.html. >> # Maybe it was not good to attach a file. S

Re: crash if fork(2) from another thread

2008-09-28 Thread Hirokazu Yamamoto
> I think this is not allowed in here. You can only do async-signal-safe stuff > in the child. IO is AFAIK not in that category. Basically, the only thing you > can safely do in the child process is to call exec(). Thank you for reply. I found similar info in MacOSX doc. (in CAVEATS) http://devel

Re: crash if fork(2) from another thread

2008-09-28 Thread Hirokazu Yamamoto
> Why do people think that the fact that they sent email which never > made it to the list is interesting? > > Attaching a file is fine and is the preferred way of doing this. > Your problem is that you're using nabble. Use the actual > mailing list or gmane. Yes, I'm using actual mailing list. I

Re: crash if fork(2) from another thread

2008-09-28 Thread Spiro Trikaliotis
Hello Christopher, * On Sat, Sep 27, 2008 at 11:30:13PM -0400 Christopher Faylor wrote: > On Sun, Sep 28, 2008 at 11:16:21AM +0900, Hirokazu Yamamoto wrote: > ># I've post mail, but it didn't show up in > >http://www.nabble.com/Cygwin-f12165.html. > ># Maybe it was not good to attach a file. So tr

Re: crash if fork(2) from another thread

2008-09-28 Thread Václav Haisman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hirokazu Yamamoto wrote, On 28.9.2008 4:16: > # I've post mail, but it didn't show up in > http://www.nabble.com/Cygwin-f12165.html. > # Maybe it was not good to attach a file. So try again... > > I'm not familiar with pthread & fork, but I think fo

Re: crash if fork(2) from another thread

2008-09-27 Thread Christopher Faylor
On Sun, Sep 28, 2008 at 11:16:21AM +0900, Hirokazu Yamamoto wrote: ># I've post mail, but it didn't show up in >http://www.nabble.com/Cygwin-f12165.html. ># Maybe it was not good to attach a file. So try again... Why do people think that the fact that they sent email which never made it to the lis

crash if fork(2) from another thread

2008-09-27 Thread Hirokazu Yamamoto
# I've post mail, but it didn't show up in http://www.nabble.com/Cygwin-f12165.html. # Maybe it was not good to attach a file. So try again... I'm not familiar with pthread & fork, but I think following code should not crash. Is this expected behavior? #include #include #include #include voi