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

Bug#254180: [OSHURD] start-stop-daemon.c:pid_is_user has Linux code



Scott James Remnant wrote:
On Sun, 2004-06-13 at 17:06 +0300, Ognyan Kulev wrote:
It seems that some Linux code is copied into pid_is_user function by accident. Patch is applied.

Is this the cause of #133640 being reopened?

No.

Only part of patch in #133640 is applied and here is the result:

(1) HURD_IHASH_ITERATE is used and start-stop-daemon.c is not compiled with -std=gnu99. This means that this source file is uncompilable under the Hurd. In the original patch, -std=gnu99 was enabled only for start-stop-daemon.c.

(2) pid_is_{user,cmd} is called before do_procinit and most probably this is the reason for the SEGV (because procset global variable is not initialized). In the original patch, do_procinit was turned into constructor and so procset is always initalized.

I admit that sending the small patch you are referring to is confusing. I did it mostly so that it's not forgotten.

I'll work on these both issues tomorrow and I will submit patch that won't use constructor or C99 features, and will contain some other minor changes too.

(As for (1), there is some function proc_stat_list_for_each which looks very promising, so internal Hurd library ihash won't be used after all.)

Regards,
ogi








Reply to: