[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add facility to collect stderr of async subprocess
From: |
Daiki Ueno |
Subject: |
Re: [PATCH] Add facility to collect stderr of async subprocess |
Date: |
Wed, 08 Apr 2015 16:05:37 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
> The function register_aux_fd records both of its arguments in the
> fd_info[] array. Why do we need to record outchannel? We never watch
> on MS-Windows the descriptors used to write to the subprocesses, and
> all the writes to them are made from the man thread. E.g.,
> register_child only registers a single file descriptor. Why do we
> need to record two in this case? (If you worry about losing it, then
> don't: they are both recorded in the process object.)
>
> What am I missing?
No, that's my misunderstanding. Thanks for pointing it out. Also,
serial port related stuff in that function (copied from 'serial_open')
was not necessary. The 'register_aux_fd' function now looks like:
void
register_aux_fd (int fd)
{
cp = new_child ();
if (!cp)
error ("Could not create child process");
cp->fd = fd;
cp->status = STATUS_READ_ACKNOWLEDGED;
if (fd_info[ fd ].cp != NULL)
{
error ("fd_info[fd = %d] is already in use", fd);
}
fd_info[ fd ].cp = cp;
fd_info[ fd ].hnd = (HANDLE) _get_osfhandle (fd);
}
Regards,
--
Daiki Ueno
Re: [PATCH] Add facility to collect stderr of async subprocess, Eli Zaretskii, 2015/04/08