Re: [msysGit] [PATCH/RFC 09/11] daemon: use run-command api for async serving

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mittwoch, 2. Dezember 2009, Erik Faye-Lund wrote:
> On Fri, Nov 27, 2009 at 9:59 PM, Johannes Sixt <j6t@xxxxxxxx> wrote:
> > Would it make sense to
> > have a function finish_async_nowait() instead of is_async_alive() that
> > (1) stresses the start/finish symmetry and (2) can return more than just
> > Boolean?
>...
>
> I'm not entirely sure how to make the interface, though. Any good
> suggestions?

I suggest to model finish_async_nowait() after waitpid() so that

	while ((pid = waitpid(-1, &status, WNOHANG)) > 0) ...
becomes
	while ((pid = finish_async_nowait(&some_async, &status)) > 0) ...

but where the resulting status is already "decoded", i.e. zero is success and 
non-zero is failure (including death through signal); WIFEXITED and 
WEXITSTATUS should not be applicable to status anymore.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]