Process Creation Question

Process Creation Question

Post by Nova » Thu, 21 Dec 2000 16:38:05



Hello,

Could someone point me to some commands that I can use to run a process in a
different way than just executing it from a console.

What I am trying to do is start some programs during boot, but the software
is not made as a deamon.
I have tried to use the "&" command but that doesn't really work.
Are there any other commands that will give me more control?

Preferrably, I would like to choose which tty the program should run on and
be able to switch to it later on.

Thanks

 
 
 

Process Creation Question

Post by cgsku.. » Thu, 21 Dec 2000 20:34:37


I really don't know the answer. But a look at the files in the
/etc/rc.d/* may give you some leads.
And I feel, being choosy about the tty is too much to ask for or is not
an issue at all.



Quote:> Hello,

> Could someone point me to some commands that I can use to run a
process in a
> different way than just executing it from a console.

> What I am trying to do is start some programs during boot, but the
software
> is not made as a deamon.
> I have tried to use the "&" command but that doesn't really work.
> Are there any other commands that will give me more control?

> Preferrably, I would like to choose which tty the program should run
on and
> be able to switch to it later on.

> Thanks

Sent via Deja.com
http://www.deja.com/

 
 
 

Process Creation Question

Post by Simon E. Minic » Fri, 22 Dec 2000 01:23:47



> I really don't know the answer. But a look at the files in the
> /etc/rc.d/* may give you some leads.
> And I feel, being choosy about the tty is too much to ask for or is not
> an issue at all.



> > Hello,

> > Could someone point me to some commands that I can use to run a
> process in a
> > different way than just executing it from a console.

> > What I am trying to do is start some programs during boot, but the
> software
> > is not made as a deamon.
> > I have tried to use the "&" command but that doesn't really work.
> > Are there any other commands that will give me more control?

> > Preferrably, I would like to choose which tty the program should run
> on and
> > be able to switch to it later on.

> > Thanks

> Sent via Deja.com
> http://www.deja.com/

If your program is not a deamon, then I presume that you want to see
some screen output
of this program, so you need to run it to a tty ?

If this is the case the simplest way around that I can think of is to
add a new user to the
system, and add the execution of the program to the .bash_profile (Or
equivilent).
If you need to limit the tty's that are allowed to run this app then add
...

tty_number=`tty` # note the use if key next to No. 1 key on UK keyboard
( Above TAB)

case $tty_number in
        /dev/tty1 ) /<your path>/<your file> ;; # the ";;" exits the script
        /dev/tty2 ) /<another path>/<another file> ;;
esac # case backwards

all you need to do now is login as the created user, and your app runs.
Be careful which group you create your user in if you need to share
files with other users

Simon

--
Microsoft is not the answer, Microsoft is the question.
No or Linux is the answer.

Linux! Because a PC is a terrible thing to waste.

 
 
 

Process Creation Question

Post by Kenny Pearc » Fri, 22 Dec 2000 04:56:55



> I really don't know the answer. But a look at the files in the
> /etc/rc.d/* may give you some leads.
> And I feel, being choosy about the tty is too much to ask for or is not
> an issue at all.

I can see where this would come in handy. You don't need to specify the
tty as a specific number, you only need to tell it that you want, say,
each of three programs to run in different ttys and the user to be shown a
fourth tty upon boot up, the user could then us ctrl + alt + Fx to see the
output of the programs...
 
 
 

Process Creation Question

Post by Tomas Floria » Fri, 22 Dec 2000 06:50:36


Ok these are the specifics:

I have OpenPhone programs for voice over IP ... I have them running nicely
but now, what I want to do is to start them up every time my machine boots
up.
They are not deamons, and although I do not need to control them once they
are executed, it would be nice if I could view their output.  
Also all of this runs on a server in my ba*t so I kind of need a way to
get to the application over telnet.

Thanks,
Tomas


> I really don't know the answer. But a look at the files in the
> /etc/rc.d/* may give you some leads.
> And I feel, being choosy about the tty is too much to ask for or is not
> an issue at all.



> > Hello,

> > Could someone point me to some commands that I can use to run a
> process in a
> > different way than just executing it from a console.

> > What I am trying to do is start some programs during boot, but the
> software
> > is not made as a deamon.
> > I have tried to use the "&" command but that doesn't really work.
> > Are there any other commands that will give me more control?

> > Preferrably, I would like to choose which tty the program should run
> on and
> > be able to switch to it later on.

> > Thanks

> Sent via Deja.com
> http://www.veryComputer.com/

 
 
 

Process Creation Question

Post by Kevi » Fri, 05 Jan 2001 02:36:02


If these programs create a log, or if you redirect the output of the
command to a file, you could view the output with a tail -f in any
screen you like.  
I've also noticed that nohup in the more recent versions of redhat
have been creating a nohup.out when I run them.  I had never noticed
this before, but my RH 7 (and I think RH 6.2 as well) did that.  I'm
not sure I like it, but it's there.

On Wed, 20 Dec 2000 21:50:36 GMT, Tomas Florian


>Ok these are the specifics:

>I have OpenPhone programs for voice over IP ... I have them running nicely
>but now, what I want to do is to start them up every time my machine boots
>up.
>They are not deamons, and although I do not need to control them once they
>are executed, it would be nice if I could view their output.  
>Also all of this runs on a server in my ba*t so I kind of need a way to
>get to the application over telnet.

>Thanks,
>Tomas


>> I really don't know the answer. But a look at the files in the
>> /etc/rc.d/* may give you some leads.
>> And I feel, being choosy about the tty is too much to ask for or is not
>> an issue at all.



>> > Hello,

>> > Could someone point me to some commands that I can use to run a
>> process in a
>> > different way than just executing it from a console.

>> > What I am trying to do is start some programs during boot, but the
>> software
>> > is not made as a deamon.
>> > I have tried to use the "&" command but that doesn't really work.
>> > Are there any other commands that will give me more control?

>> > Preferrably, I would like to choose which tty the program should run
>> on and
>> > be able to switch to it later on.

>> > Thanks

>> Sent via Deja.com
>> http://www.veryComputer.com/

 
 
 

1. Find exact creation time of a process; not kill a wrong process

(1)
Is there a portable way in Shell, Perl, other tools to find
the exact number of seconds since epoch of a process?

timestamp on /proc/<pid> disqualifies as it is not portable,
Linux /proc/<pid> is always current time.

"current time - elapsed time from ps" disqualifies as
current time and elapsed time from ps are taken at different
times, it may be off by a few seconds.

(2)
How can I kill a process without worrying killing a wrong process?
For example,

some_process & pid=$!
kill $pid

The $pid may be a recycled new process.

I am building an application used on space shuttle, and need
100% reliability. Please help.

Thanks.
--

2. Epson Action Laser 1500 Printcap setup

3. Buffer Overflows: Question about the internals of process creation and stack maintenence.

4. question

5. automate user creation process

6. Konqueror and NT LAN

7. Swapper process creation

8. GCC 2.7.2/Linux/HELP!!!!

9. process creation/deletions hooks

10. The low frequency of process creation - What to do?

11. Qs on attack by high rate process creation

12. Tracing a process and its thread creations in a linux kernel module

13. Logging process creation