Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-01-2005, 08:56 PM   #1
Registered: Dec 2004
Posts: 69

Rep: Reputation: 15
respawn--about "/etc/inittab"


I copy a console program named TEST to the directory "/sbin" , and
append "2:2345:respawn:/sbin/TEST" to the end of the file "/etc/inittab".

I thought init would call TEST automatically when OS reboot, and if TEST exited, init would call it again.

But when I reboot my system, I find TEST isn't called.

What's the matter?

Old 02-01-2005, 11:37 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
That should work, AFAIK. is there anything in your logs about it? If the process continuously quits, init may complain about having to respawn it too quickly. beyond that, I can't really help much.
Old 02-02-2005, 12:38 AM   #3
Registered: Dec 2004
Posts: 69

Original Poster
Rep: Reputation: 15

there's no log file

dose it work well on your pc?
Old 02-02-2005, 01:44 AM   #4
Registered: Dec 2004
Posts: 69

Original Poster
Rep: Reputation: 15
it works now. I forgot to make it a daemon...

But there're 10 process in the OS, I don't know why.

what's the detailed mean of "2:2345:respawn:/sbin/TEST" ?

#include <stdio.h>
#include <unistd.h>

int main(int argc, char *argv[])
	if (fork()) return 0;

	int i = 0;
	while (true) {
		if (i++ > 300) break;
	return 0;


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is "sticky bit mode" , "SUID" , "SGID" augustus123 Linux - General 10 08-03-2012 05:40 AM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 04:07 PM
The inittab line "ud::once:/sbin/update" and mdk 9.1 Wasteed Mandriva 0 09-03-2003 08:04 AM
no automatic startx and /etc/inittab set at "5" chess Linux - General 2 03-05-2002 04:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration