File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -714,12 +714,12 @@ void nsexec(void)
714714 * ready, so we can receive all possible error codes
715715 * generated by children.
716716 */
717+ syncfd = sync_child_pipe [1 ];
718+ close (sync_child_pipe [0 ]);
719+
717720 while (!ready ) {
718721 enum sync_t s ;
719722
720- syncfd = sync_child_pipe [1 ];
721- close (sync_child_pipe [0 ]);
722-
723723 if (read (syncfd , & s , sizeof (s )) != sizeof (s ))
724724 bail ("failed to sync with child: next state" );
725725
@@ -789,13 +789,13 @@ void nsexec(void)
789789
790790 /* Now sync with grandchild. */
791791
792+ syncfd = sync_grandchild_pipe [1 ];
793+ close (sync_grandchild_pipe [0 ]);
794+
792795 ready = false;
793796 while (!ready ) {
794797 enum sync_t s ;
795798
796- syncfd = sync_grandchild_pipe [1 ];
797- close (sync_grandchild_pipe [0 ]);
798-
799799 s = SYNC_GRANDCHILD ;
800800 if (write (syncfd , & s , sizeof (s )) != sizeof (s )) {
801801 kill (child , SIGKILL );
You can’t perform that action at this time.
0 commit comments