Unix Programming - Adding a program in Startup

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > June 2004 > Adding a program in Startup





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Adding a program in Startup
Yogesh

2004-06-26, 10:11 am

How to Add a program in Startup ? so it it can start Automatically at
the start-up time .
I want to create something similar to Service in Windows(My own),in
Solaris.
How can i do this (Using C Language)
Chuck Dillon

2004-06-26, 10:11 am

Yogesh wrote:
> How to Add a program in Startup ? so it it can start Automatically at
> the start-up time .
> I want to create something similar to Service in Windows(My own),in
> Solaris.
> How can i do this (Using C Language)


See the man pages for init.d, inittab and inetd.conf

init.d describes the system startup process and how the startup scripts
are organized. You can insert your own startup/shutdown script in one
of the run levels.

inittab describes a higher level startup mechanism driven by the table
/etc/inittab. Entries in that table describe processes to be run by
the system. This is pretty analogous to MS-Windows services.

inetd.conf is for network services. If your "service" services socket
connections you might want to configure it to work via inetd.

You also might want to do some reading at docs.sun.com. The admin
manuals might be of more help than the man pages.

HTH,

-- ced

--
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.
David Logan

2004-06-26, 10:11 am

Yogesh wrote:
> How to Add a program in Startup ? so it it can start Automatically at
> the start-up time .
> I want to create something similar to Service in Windows(My own),in
> Solaris.
> How can i do this (Using C Language)



Typically you add it to rc.local (or some form thereof.) Look in
/etc/rc.d or its equivalent, depending on which *nix you are running.

David Logan
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com