Subject: Re: Time sharing and fork
From: Stephane Corbe <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Fri, 22 Mar 2002 12:50:07 +0000

An interresting part of strace traces of the programm show well that the
child didn't start before the death of his father :

260> Je suis le pere 9991
260> Je suis le pere 9992
260> Je suis le pere 9993
260> Je suis le pere 9994
260> Je suis le pere 9995
260> Je suis le pere 9996
260> Je suis le pere 9997
260> Je suis le pere 9998
260> Je suis le pere 9999
  212  418827 [main] f 159 fhandler_base::write: 857 = write (0xA012620,
857)
  197  419024 [main] f 159 _write: 857 = write (1, 0xA012620, 857)
  187  419211 [main] f 159 do_exit: do_exit (0)
  200  419411 [main] f 159 void: 0x0 = signal (20, 0x1)
  193  419604 [main] f 159 void: 0x0 = signal (1, 0x1)
  179  419783 [main] f 159 void: 0x0 = signal (2, 0x1)
  188  419971 [main] f 159 void: 0x0 = signal (3, 0x1)
  253  420224 [main] f 159 fhandler_base::close: closing 'unknown disk
file' handle 0x3C
  269  420493 [main] f 159 proc_terminate: nchildren 1, nzombies 0
  214  420707 [proc] f 159 wait_subproc: looping
  219  420926 [proc] f 159 wait_subproc: done
  507  421433 [main] f 159 proc_subproc: args: 3, 1
  207  421640 [main] f 159 proc_subproc: clear waiting threads
  189  421829 [main] f 159 proc_subproc: finished clearing
  197  422026 [main] f 159 proc_subproc: returning 1
  193  422219 [main] f 159 proc_terminate: 260(260) closed child handle
  222  422441 [main] f 159 proc_terminate: leaving
  199  422640 [main] f 159 sigproc_terminate: entering
  179  422819 [main] f 159 sigproc_terminate: done
  186  423005 [main] f 159 do_exit: 159 == pgrp 159, send SIG{HUP,CONT}
to stopped children     <------- signal that can't be received (as said
cfg)
  207  423212 [main] f 159 kill_pgrp: pid 159, signal -1
 1810  425022 [main] f 159 pinfo::init: execed process windows pid 272,
cygwin pid 258
  452  425474 [main] f 159 pinfo::init: execed process windows pid 206,
cygwin pid 319
  413  425887 [main] f 159 kill_pgrp: -1 = kill (159, -1)
  803  426690 [main] f 159 __to_clock_t: dwHighDateTime 0, dwLowDateTime
1101584
  184  426874 [main] f 159 __to_clock_t: total 00000000 0000006E
  192  427066 [main] f 159 __to_clock_t: dwHighDateTime 0, dwLowDateTime
1001440
  183  427249 [main] f 159 __to_clock_t: total 00000000 00000064
 9163  436412 [main] f 159 _pinfo::exit: Calling ExitProcess 0
<------------- Death of the father
311840  446320 [main] f 260 fixup_mmaps_after_fork:
recreate_mmaps_after_fork, mmapped_areas 0x0
  263  446583 [main] f 260 MTinterface::fixup_after_fork: mutexs is 0
  184  446767 [main] f 260 MTinterface::fixup_after_fork: conds is 0
  186  446953 [main] f 260 MTinterface::fixup_after_fork: semaphores is 0

  409  447362 [main] f 260 sigproc_init: process/signal handling
enabled(821)

  204  447566 [main] f 260 fork: 0 = fork()    <--------- Return of fork
in the child

  248  447814 [main] f 260 _write: write (2, 0x401060, 17)
  215  448029 [main] f 260 fhandler_console::write: 401060, 17
  187  448216 [main] f 260 fhandler_console::write: at 115(s) state is 1
  362  448578 [main] f 260 fhandler_console::write: 17 = write_console
(,..17)
  191  448769 [main] f 260 _write: 17 = write (2, 0x401060, 17)
  196  448965 [main] f 260 _write: write (2, 0x6108C0F8, 2)
  186  449151 [main] f 260 fhandler_console::write: 6108C0F8, 2
  181  449332 [main] f 260 fhandler_console::write: at 58(:) state is 1
  282  449614 [main] f 260 fhandler_console::write: 2 = write_console
(,..2)
  189  449803 [main] f 260 _write: 2 = write (2, 0x6108C0F8, 2)
  213  450016 [main] f 260 _write: write (2, 0x6100B544, 24)
  186  450202 [main] f 260 fhandler_console::write: 6100B544, 24
  182  450384 [main] f 260 fhandler_console::write: at 70(F) state is 1
  304  450688 [main] f 260 fhandler_console::write: 24 = write_console
(,..24)
  189  450877 [main] f 260 _write: 24 = write (2, 0x6100B544, 24)
  200  451077 [main] f 260 _write: write (2, 0x610A02F7, 1)
  186  451263 [main] f 260 fhandler_console::write: 610A02F7, 1
  187  451450 [main] f 260 fhandler_console::write: at 10(0x20) state is
1
10870  462320 [main] f 260 fhandler_console::write: 1 = write_console
(,..1)
  199  462519 [main] f 260 _write: 1 = write (2, 0x610A02F7, 1)
  190  462709 [main] f 260 _write: write (2, 0x401072, 16)
  185  462894 [main] f 260 fhandler_console::write: 401072, 16
  190  463084 [main] f 260 fhandler_console::write: at 115(s) state is 1
  294  463378 [main] f 260 fhandler_console::write: 16 = write_console
(,..16)
  198  463576 [main] f 260 _write: 16 = write (2, 0x401072, 16)
  189  463765 [main] f 260 _write: write (2, 0x6108C0F8, 2)
  191  463956 [main] f 260 fhandler_console::write: 6108C0F8, 2
  183  464139 [main] f 260 fhandler_console::write: at 58(:) state is 1
  280  464419 [main] f 260 fhandler_console::write: 2 = write_console
(,..2)
  214  464633 [main] f 260 _write: 2 = write (2, 0x6108C0F8, 2)
  189  464822 [main] f 260 _write: write (2, 0x6100B544, 24)
  195  465017 [main] f 260 fhandler_console::write: 6100B544, 24
  181  465198 [main] f 260 fhandler_console::write: at 70(F) state is 1
  301  465499 [main] f 260 fhandler_console::write: 24 = write_console
(,..24)
  191  465690 [main] f 260 _write: 24 = write (2, 0x6100B544, 24)
  189  465879 [main] f 260 _write: write (2, 0x610A02F7, 1)
  195  466074 [main] f 260 fhandler_console::write: 610A02F7, 1
  182  466256 [main] f 260 fhandler_console::write: at 10(0x20) state is
1
10862  477118 [main] f 260 fhandler_console::write: 1 = write_console
(,..1)
  190  477308 [main] f 260 _write: 1 = write (2, 0x610A02F7, 1)
  371  477679 [main] f 260 _write: write (1, 0xA012620, 1024)
  202  477881 [main] f 260 fhandler_base::write: text write
after fork 0
0> Je suis le fils 0
0> Je suis le fils 1
0> Je suis le fils 2
0> Je suis le fils 3
0> Je suis le fils 4
0> Je suis le fils 5
0> Je suis le fils 6
0> Je suis le fils 7
0> Je suis le fils 8
0> Je suis le fils 9
0> Je suis le fils 10

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/