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

Re: Porting upstart to kfreebsd



Adding Scott to CC as he's not subscribed, too.

Petr Salinger wrote:
> Hi.
> 
>> One of the prerequisites we identified, was to maintain proper support for kfreebsd.
>> An idea was, to provide a small helper utility for sysvinit, that allows to
>> execute native upstart jobs, even when running under sysvinit. We will implement
>> such a tool, which we called upstart-job, most likely anyway, but it can't
>> provide the full feature set that upstart provides.
>> So ideally we want to see upstart ported to kfreebsd.
> 
> I quickly looked into sources, it seems it will need
> 
> * some "#ifdef SIGPWR" as SIGPWR is not available on GNU/kFreeBSD

Ok, seems easy enough.

> * use wait4() instead of waitid() in nih/child.c

Ok.

> * emulate inotify() used in nih/watch.c by kqueue() or
>    via using pnotify library, see http://mark.heily.com/pnotify/

Ok.

> Is the nih/watch.c mandatory or can it be optional ?

I think, upstart should still be operational. Inotify is (mostly) used for
monitoring the directory with the Upstart configuration/job files.

If nih/watch.c was a dummy on kfreebsd, one would propbaly have to tell upstart
explicitly about new job configuration, e.g. by telinit Q.

I'll let Scott answer that more properly though.

> * some "#ifdef __linux__" around "#include <linux/ptrace.h>"

I think this is the most hairy part. ptrace is used for tracking the pid of
forking/daemonizing processes, and as such a central part of upstarts
functionality. So it needs a proper port to a similar mechanism on kfreebsd.

As a further note, Scott intends to replace the ptrace code with a netlink
connector approach in the next major upstream release, which is supposedly 0.10.

Again, Scott should be able to tell you more.

Cheers,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: