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
– val0x00ff yesterdaytrap 'kill -s SIGSTOP 1234' EXIT
but I get same error – user4757345 yesterday#!/bin/sh
to#!/bin/bash
. I always use#!/bin/sh
and now I really do not know why it does not work. – user4757345 yesterdayset +o posix; kill -SIGSTOP 1234
could solve the problem as well! – val0x00ff yesterday