Re: Detect if a program is being traced
From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 02/25/05
- Previous message: Ed Morton: "Re: sed problem"
- In reply to: chengiz_at_my-deja.com: "Detect if a program is being traced"
- Next in thread: chengiz_at_my-deja.com: "Re: Detect if a program is being traced"
- Reply: chengiz_at_my-deja.com: "Re: Detect if a program is being traced"
- Reply: Alan Connor: "Re: Detect if a program is being traced"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 16:13:15 -0500
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
- Previous message: Ed Morton: "Re: sed problem"
- In reply to: chengiz_at_my-deja.com: "Detect if a program is being traced"
- Next in thread: chengiz_at_my-deja.com: "Re: Detect if a program is being traced"
- Reply: chengiz_at_my-deja.com: "Re: Detect if a program is being traced"
- Reply: Alan Connor: "Re: Detect if a program is being traced"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]