[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] auto updates
From: |
Brian May |
Subject: |
Re: [Monotone-devel] auto updates |
Date: |
Sun, 29 Oct 2006 20:59:35 +1100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux) |
>>>>> "Timothy" == Timothy Brownawell <Timothy> writes:
Timothy> Oh, right, we do actually. spawn(program, ...) . We
Timothy> actually implement execute(program, ...) with spawn() and
Timothy> wait(). However, I don't think we have a way collect
Timothy> finished child processes; our only wait() function is a
Timothy> blocking wait for that particular child (tester exposes a
Timothy> version of wait that has a timeout, which could maybe be
Timothy> useful for something like this, maybe we should make it
Timothy> available in monotone as well?). So while you can
Timothy> spawn-in-background directly you'll probably end up with
Timothy> lots of zombies, which IIRC is bad.
Hmmm...
Me thinks if I do something like
execute("daemon",...)
where daemon is the following program:
Package: daemon
Priority: optional
Section: utils
Installed-Size: 332
Maintainer: Marc Haber <address@hidden>
Architecture: powerpc
Version: 0.6.3-1
Depends: libc6 (>= 2.3.2.ds1-4)
Filename: pool/main/d/daemon/daemon_0.6.3-1_powerpc.deb
Size: 111398
MD5sum: 3a9064b5a95b3af19db2a4abe7d324fa
SHA1: 045aefdf4c09e0aeca47fc37b769bc136125a2b6
SHA256: 9a934404a1f08d81e211fac161a07973292ad4b18a50c516271b1297986a10bb
Description: turns other processes into daemons
There are many tasks that need to be performed to correctly set up a
daemon process. This can be tedious. Daemon performs these tasks for
other processes. This is useful for writing daemons in languages other
than C, C++ or Perl (e.g. /bin/sh, Java).
.
If you want to write daemons in languages that can link against C functions
(e.g. C, C++), see libslack which contains the core functionality of daemon.
.
Upstream URL: http://www.libslack.org/daemon/
Tag: admin::configuring, interface::daemon, made-of::lang:c, role::sw:utility
I might start getting somewhere. As a bonus, this should automatically
check to see if any process is already running first before starting a
new process, etc (it supports all the daemon stuff like PID files, log
files, stdout/stderr redirection, etc).
I will think more about this tomorrow.
It should solve the problem with zombies, and possible other problems
we haven't yet thought of, too.
--
Brian May <address@hidden>
- Re: [Monotone-devel] auto updates, (continued)
- Re: [Monotone-devel] auto updates, Nathaniel Smith, 2006/10/29
- Re: [Monotone-devel] auto updates, Timothy Brownawell, 2006/10/29
- Re: [Monotone-devel] auto updates, Nathaniel Smith, 2006/10/29
- Re: [Monotone-devel] auto updates, Zack Weinberg, 2006/10/29
- Re: [Monotone-devel] auto updates, Nuno Lucas, 2006/10/29
- Re: [Monotone-devel] auto updates, Nathaniel Smith, 2006/10/29
- Re: [Monotone-devel] auto updates, Zack Weinberg, 2006/10/29
- Re: [Monotone-devel] auto updates, Nuno Lucas, 2006/10/29
- offtopic: POSIX signals (was Re: [Monotone-devel] auto updates), Nathaniel Smith, 2006/10/29
- Re: [Monotone-devel] auto updates, Nathaniel Smith, 2006/10/29
- Re: [Monotone-devel] auto updates,
Brian May <=
- Re: [Monotone-devel] auto updates, Brian May, 2006/10/30