Thread (2 messages) 2 messages, 2 authors, 2012-05-31

task struct and the #! operator

From: Vladimir Murzin <hidden>
Date: 2012-05-31 04:51:43

Hi,

Have a look at binfmt_script.c [1] $)

[1] http://lxr.free-electrons.com/source/fs/binfmt_script.c

Best wishes
Vladimir Murzin

On 5/31/12, Ranjan Sinha [off-list ref] wrote:
Hi,

I am trying to understand process creation and associated
bookkeeping.I am currently trying to understand how interpreted
scripts (the shebang operator) are executed.

It was surprising to see that the comm member of task_struct (accessed
through get_task_comm) is actually set to the name of the script
though /proc/pid/exe correctly points to the invoked interpreter. Does
anybody know where the necessary magic happen and is it possible to
get the name of invoked interpreter through any means inside the
kernel?

Thanks in advance,
Ranjan

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help