Re: Detect if a program is being traced

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 02/26/05


Date: Sat, 26 Feb 2005 03:02:17 GMT

On Fri, 25 Feb 2005 16:13:15 -0500, Bill Marcum
<bmarcum@iglou.com.urgent> wrote:

> On 25 Feb 2005 11:10:24 -0800, chengiz@my-deja.com
> <chengiz@my-deja.com> wrote:
>
>> Is there any way for a (C) program to figure out whether it is
>> being traced... perhaps a unistd function?
>>
>> Is there any way the shell can figure out whether a given
>> program is being traced?
>
>
> For a shell script: case $- in *x*) echo "Don't look now but I
> think we're being followed!" ;; esac

:-)

AC