lkml.org 
[lkml]   [2005]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWriting as init without /dev/console?
Hello!

Currently I do not open /dev/console in cinit, but currently
I do see very strange behaviour:

If the first printf() in the following code (from serv/cinit.c) is
enabled, the socket communication will later fail:

----------------------------------------------------------------------
#ifdef DEBUG
// printf("ARGC=%d\n",argc);
#endif

set_signals(ACT_SERV); /* set signal handlers */
#ifdef DEBUG
printf("ARGC=%d\n",argc);
#endif
----------------------------------------------------------------------

I don't know what could be the relation between this printf and the
behaviour that cinit-0.1 later hangs in comm/do_result when reading
the resulting byte from a socket.

If you want to see the full code, it can be found at [0].

This code contains serv/cinit.c, which is the same as found
in cinit-0.0.8 [1] and serv/cinit.c-cinit0.1, which is the one
with a bit more debugging and the printf() before set_signals,
which makes cinit hang in comm/do_result at the position when
fpoint() is called.

Perhaps this is an issue with not opening /dev/console? It's just
a guess, because I don't have any idea what could cause this behaviour.

If someone has _any_ idea, I would be very thankful.

Nico

[0]: http://creme.schottelius.org/~nico/pre-release/cLinux/cinit-0.1-rc4.tar.bz2

P.S.: I do read replies to the mailing list via web-interface, replies
to me must be confirmed otherwise.

--
Keep it simple & stupid, use what's available.
Please use pgp encryption: 8D0E 27A4 is my id.
http://nico.schotteli.us | http://linux.schottelius.org
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-06-20 15:55    [W:0.043 / U:2.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site