"Interrupted function call" exception while relogging :(

Discussion in 'Python' started by Sylwia, Jan 8, 2004.

  1. Sylwia

    Sylwia Guest

    Hi!

    I need your help...

    I have the following problem. I've implemented the python Windows
    Service which behaves like a log supervisor. If the space

    used by log files is bigger than a given upper limit, then it starts
    to delete log files until the space is less than a given

    lower limit. I configured the service to start up automatically on
    system boot. The script checks the space used by log files

    every 1000 secs. After analyse of the space, it falls asleep
    (time.sleep(1000)). Everything works OK, except one thing...

    Since the service is not tied to the user ID of the person starting
    it, the service should remain open even when that person

    who started it logs off. So I made an experiment and relogged. After
    that it turned out that the service stopped working. The

    Event Viewer returned the error:

    "SvcDoRun
    time.sleep(1000)
    exceptions.IOError: [Errno 4] Interrupted function call
    "
    I use Window XP OS and Python and Python 2.3.2

    I guess that some asynchronous signal was caught by the process during
    the execution of an interruptible function

    (time.sleep(1000)). Maybe it happened while pressing Ctrl+Alt+Del
    sequence during logging? Maybe I should add some signal

    handling?
    Unfortunately the Windows signal implementation is limited to 6
    signals(???):

    SIGABRT Abnormal termination
    SIGFPE Floating-point error
    SIGILL Illegal instruction
    SIGINT CTRL+C signal
    SIGSEGV Illegal storage access
    SIGTERM Termination request

    Please help me...

    Best wishes,

    Sylwia
    Sylwia, Jan 8, 2004
    #1
    1. Advertising

  2. (Sylwia) writes:

    > Hi!
    >
    > I need your help...
    >
    > I have the following problem. I've implemented the python Windows
    > Service which behaves like a log supervisor. If the space
    >
    > used by log files is bigger than a given upper limit, then it starts
    > to delete log files until the space is less than a given
    >
    > lower limit. I configured the service to start up automatically on
    > system boot. The script checks the space used by log files
    >
    > every 1000 secs. After analyse of the space, it falls asleep
    > (time.sleep(1000)). Everything works OK, except one thing...
    >
    > Since the service is not tied to the user ID of the person starting
    > it, the service should remain open even when that person
    >
    > who started it logs off. So I made an experiment and relogged. After
    > that it turned out that the service stopped working. The
    >
    > Event Viewer returned the error:
    >
    > "SvcDoRun
    > time.sleep(1000)
    > exceptions.IOError: [Errno 4] Interrupted function call
    > "
    > I use Window XP OS and Python and Python 2.3.2


    Just an idea: you could try to use win32api.Sleep() instead.

    Thomas
    Thomas Heller, Jan 8, 2004
    #2
    1. Advertising

  3. Sylwia

    Nazgul Guest

    Uzytkownik "Thomas Heller" <> napisal w wiadomosci >
    writes:
    > Just an idea: you could try to use win32api.Sleep() instead.
    >
    > Thomas


    Thanks! I will try now and let you know if it works for my case... Thanks
    for reply!

    Best wishes,

    Sylwia
    Nazgul, Jan 8, 2004
    #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. ^CrazyCoder^
    Replies:
    3
    Views:
    7,252
    Terrence Benade
    Sep 15, 2003
  2. Sylwia
    Replies:
    0
    Views:
    483
    Sylwia
    Jan 7, 2004
  3. Nazgul
    Replies:
    0
    Views:
    772
    Nazgul
    Jan 8, 2004
  4. mahesh
    Replies:
    0
    Views:
    1,437
    mahesh
    Mar 8, 2007
  5. ashish
    Replies:
    1
    Views:
    432
    Roger Upole
    Oct 12, 2007
Loading...

Share This Page