Restart process with SIGHUP

L

LukasMeyerUK

Hello,

I'm trying to restart a process with the os.kill command. My Problem is
that if the command gets executed, my python script stops working. I
want to SIGHUP a process with the following command: os.kill(pid,
signal.SIGHUP).

Can anyone give me a hint in solving this?

Best regards,

Lukas
 
M

Mike Meyer

I'm trying to restart a process with the os.kill command. My Problem is
that if the command gets executed, my python script stops working. I
want to SIGHUP a process with the following command: os.kill(pid,
signal.SIGHUP).

That looks right.
Can anyone give me a hint in solving this?

Not without knowing what the problem really is. Show us code. Show us
a traceback (best) or otherwise provide details about what "stops
working" means.

<mike
 
L

LukasMeyerUK

Got it working now. It was a silly character pid instead of an int..

int(pid) fixed it.

Thanks anyway!

regards, Lukas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top