killing thread

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vitale Ferruccio

    #1

    killing thread

    Hi all,

    I've two threads: the former blocked in an sleep(seconds) and the latter
    which have to kill the former. Even if I call pthread_cancel or deliver
    a SIGTERM signal with pthread_kill, the former thread continues to
    run and it exits only after timer expires.

    Any ideas?

    Regards
    Ferruccio

    --
    /dev/zero
    Unix Power @ Your Service
    Field notes on software, systems, and security. unixo's personal blog.


  • Lawrence Kirby

    #2
    Re: killing thread

    On Wed, 10 Aug 2005 09:49:51 +0000, Vitale Ferruccio wrote:
    [color=blue]
    > Hi all,
    >
    > I've two threads: the former blocked in an sleep(seconds) and the latter
    > which have to kill the former. Even if I call pthread_cancel or deliver
    > a SIGTERM signal with pthread_kill, the former thread continues to
    > run and it exits only after timer expires.
    >
    > Any ideas?[/color]

    Unfortunately threads are not part of the standard C programming language.
    Try asking in a newsgroup such as comp.programmin g.threads.

    Lawrence

    Comment

    • Flash Gordon

      #3
      Re: killing thread

      Vitale Ferruccio wrote:[color=blue]
      > Hi all,
      >
      > I've two threads: the former blocked in an sleep(seconds) and the latter
      > which have to kill the former. Even if I call pthread_cancel or deliver
      > a SIGTERM signal with pthread_kill, the former thread continues to
      > run and it exits only after timer expires.
      >
      > Any ideas?[/color]

      Yes. Post on a group where sleep and pthreads are on topic. They are off
      topic here where we only deal with standard C. Alse read the FAQ and
      recent posts for the group before posting. I suggest you look for groups
      with "thread", "posix" or "unix" in the name.
      --
      Flash Gordon
      Living in interesting times.
      Although my email address says spam, it is real and I read it.

      Comment

      Working...