When I use kill
on command line it works.
kill -SIGSTOP 1234
But if I use in bash script file I get this error:
kill: SIGSTOP: invalid signal specification
sh file is
#!/bin/sh
kill -SIGSTOP 1234
How can I use kill
in bash script? I tried this:
#!/bin/sh
/bin/bash -c "kill -SIGSTOP 1234"
but it does not work.
trap 'kill -s SIGSTOP 1234' EXIT
in a bash script. Also it is#!/bin/bash
trap 'kill -s SIGSTOP 1234' EXIT
but I get same error#!/bin/sh
to#!/bin/bash
. I always use#!/bin/sh
and now I really do not know why it does not work.set +o posix; kill -SIGSTOP 1234
could solve the problem as well!