Regarding writing to /proc entries

Dan Nelson dnelson at allantgroup.com
Tue Aug 3 22:01:59 PDT 2004


In the last episode (Aug 04), ravi said:
> I tried with echo -n as well . But even then the same error messge is
> coming . Please tell me the solution .

For the 'note' case, a look at the source makes it clear that it has never
been implemented.  The manpage also mentions it:

     note    Used for sending signals to the process.  Not implemented.

For 'ctl', your example is invalid.  At least on my system, process 2 is a
kernel thread.  Try with a real userland process, and note that you cannot
trace yourself (so "echo attach > /proc/$$/ctl" will fail).  For a better
ptrace interface, take a look at the ptrace() syscall.  Use of procfs is
discouraged.

> > On Tue, 3 Aug 2004, ravi wrote:
> > > 	echo attach > /proc/2/ctl

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-fs mailing list