Restart process with SIGHUP

Discussion in 'Python' started by LukasMeyerUK@gmail.com, Jan 11, 2006.

  1. Guest

    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
     
    , Jan 11, 2006
    #1
    1. Advertising

  2. Mike Meyer Guest

    writes:
    > 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
    --
    Mike Meyer <> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
     
    Mike Meyer, Jan 11, 2006
    #2
    1. Advertising

  3. Guest

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

    int(pid) fixed it.

    Thanks anyway!

    regards, Lukas
     
    , Jan 13, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian
    Replies:
    1
    Views:
    796
    Mothra
    May 25, 2004
  2. Daniel
    Replies:
    5
    Views:
    559
    Saravana
    Oct 29, 2004
  3. Paolo Veronelli

    how I restart a process from itself?

    Paolo Veronelli, Oct 21, 2004, in forum: Python
    Replies:
    1
    Views:
    306
    Larry Bates
    Oct 21, 2004
  4. Maksim Kasimov

    signal.SIGHUP handling

    Maksim Kasimov, Sep 9, 2005, in forum: Python
    Replies:
    0
    Views:
    2,164
    Maksim Kasimov
    Sep 9, 2005
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    308
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page