lkml.org 
[lkml]   [2005]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectPer-process core-file patterns
Date
  So, I want to add the "coreadm" support for manipulating the core
file-names like on Solaris, for the latest
2.6 kernel. Solaris supports the concept of per-process corefile patterns.
Hence, each process
can effectively have its own core-file pattern in the event that it
crashes. The pattern is similar to the pattern
used in fs/exec.c ( function: format_corename).
Now, I have 2 ways of implementing this on Linux:
1. Create an entry in /proc/<pid> for the process when it is forked (
default value is filled up by getting this entry
from the parent's directory;hence children inherit the parent's core
pattern),
which holds the core pattern and query it when creating the corefile
from the kernel. The "coreadm" command
in this case, just modifies this entry in /proc.
2. Add a new field in task_struct and write a new system-call (similar to
"corectl" on solaris) which can manipulate this field.
The "coreadm" command needs to do the corectl system call and modify
the parameters accordingly.

I see by "trussing" on the coreadm command on Solaris that it uses a system
call "corectl".

Which is the best approach to take?

-Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.071 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site