else
else if (mode[0] == 'w' && mode[1] == '\0')
_IO_proc_open (fp, command, mode)     _IO_FILE *fp;     const char *command;     const char *mode;{#if _IO_HAVE_SYS_WAIT  volatile int read_or_write;  volatile int parent_end, child_end;  int pipe_fds[2];  _IO_pid_t child_pid;  if (_IO_file_is_open (fp))    return NULL;  if (_IO_pipe (pipe_fds) < 0)    return NULL;  if (mode[0] == 'r')    {      parent_end = pipe_fds[0];      child_end = pipe_fds[1];      read_or_write = _IO_NO_WRITES;    }  else    {      parent_end = pipe_fds[1];      child_end = pipe_fds[0];      read_or_write = _IO_NO_READS;    }  ((_IO_proc_file *) fp)->pid = child_pid = _IO_fork ();  if (child_pid == 0)    {      int child_std_end = mode[0] == 'r' ? 1 : 0;      _IO_close (parent_end);      if (child_end != child_std_end)	{	  _IO_dup2 (child_end, child_std_end);	  _IO_close (child_end);	}      /* POSIX.2:  "popen() shall ensure that any streams from previous         popen() calls that remain open in the parent process are closed	 in the new child process." */      while (proc_file_chain)	{	  _IO_close (_IO_fileno ((_IO_FILE *) proc_file_chain));	  proc_file_chain = proc_file_chain->next;	}      _IO_execl ("/bin/sh", "sh", "-c", command, (char *) 0);      _IO__exit (127);    }  _IO_close (child_end);  if (child_pid < 0)    {      _IO_close (parent_end);      return NULL;    }  _IO_fileno (fp) = parent_end;  /* Link into proc_file_chain. */  ((_IO_proc_file *) fp)->next = proc_file_chain;  proc_file_chain = (_IO_proc_file *) fp;  _IO_mask_flags (fp, read_or_write, _IO_NO_READS|_IO_NO_WRITES);  return fp;#else /* !_IO_HAVE_SYS_WAIT */  return NULL;#endif}