Find the answer to your Linux question:
Results 1 to 3 of 3
I want to make a Client-Server Application in which once a client Application is connected to Server, user at client side should not be able to terminate it unless permission ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    1

    Way to prevent SIGKILL

    I want to make a Client-Server Application in which once a client Application is connected to Server, user at client side should not be able to terminate it unless permission is given by server.
    Client side User should not be able to terminate Client Application by kill -9 <pid> or Force Quit from Activity monitor

    I have trapped all other signals but not able to find a way to prevent SIGKILL to my Application ?

    I want to implement this functionality on BSD UNIX system

    Any help would be really great Thanks

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    SIGKILL can't be caught or ignored...Sorry Gerard4143

    (unless you defeat the OS...)
    Make mine Arch Linux

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Indeed, SIGKILL is specifically designed to be unignorable.

    I guess I'm confused about why you would want this behaviour. You can still provide a signal handler for SIGKILL so as to at least notify the server that the process is dying, so it won't be an unclean shutdown. Your server will need to be able to handle suddenly-vanishing clients in any case: what if the client machine loses power or something like that?
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...