sh coredump through rc.subr

From: Tobias Roth <roth_at_iam.unibe.ch>
Date: Wed, 30 Jul 2003 16:45:42 +0200
i just managed to get an sh coredump with an rc.d/ script of mine.
here is part of the output of /etc/rc.d/test stop :

/etc/rc.d/test: DEBUG: run_rc_command: evaluating :().
Loading configuration files.
Node type = 15
pid 5183 (sh), uid 0: exited on signal 11 (core dumped)
zsh: segmentation fault (core dumped)  /etc/rc.d/test stop

the 'Node type' message comes from sh's eval.c function.  my rc.d/test
is attached.

the shell dies after the last command from test_stop(), but before the
next command from run_rc_command(), as far as i can tell.


what i want to do is basically the same that is done by
rc.shutdown: going through rc.d/ in reverse order and calling every
script with a 'stop' argument. my code is almost the same as in
rc.shutdown. if i run test_stop manually (i.e. not through
run_rc_command "$1" at the bottom of my script), everything seems to
work just fine.

can someone help me with this?

thanks, t.

Received on Wed Jul 30 2003 - 05:45:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:17 UTC