lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13999.1560455005@turing-police>
Date:   Thu, 13 Jun 2019 15:43:25 -0400
From:   "Valdis Klētnieks" <valdis.kletnieks@...edu>
To:     Shyam Saini <mayhs11saini@...il.com>
Cc:     Pintu Agarwal <pintu.ping@...il.com>,
        open list <linux-kernel@...r.kernel.org>, pedro@...ves.net,
        Kernelnewbies <kernelnewbies@...nelnewbies.org>
Subject: Re: Pause a process execution from external program

On Thu, 13 Jun 2019 13:22:12 +0530, Shyam Saini said:

> from command line we use ctrl-z to stop execution of a foreground
> process but you can program
> SIGTSTP signal handler in your application code to do the same.

Note that if you simply fail to include a signal handler for SIGSTOP and
SIGCONT, it will Do The Right Thing.  The only programs that need worry about
SIGTSTP are ones like 'vi' that may want to do something (like restore the
terminal state from raw to cooked mode, etc) before they stop.  That's why you
can control-z /bin/cat without it having to include a signal handler for it.

% kill -STOP `pidof process-to-stop`   # stop it
% kill -CONT `pidof process-to-stop`  # and make it run again.

No source code modifications needed.  No source needed.

Now, if you want to make it stop at a *specific point*, then you're into
ptrace territory, and source will be helpful.


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ