| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
musl 1.2.0 turns time_t into a 64-bit value, even on 32-bit. This makes it
compatible.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shows how long an initd task took, for example:
procd: stop /etc/init.d/dropbear running - took 0.088824s
procd: Update service dnsmasq
procd: Update instance dnsmasq::dnsmasq
procd: running /etc/init.d/dnsmasq running
procd: start /etc/init.d/dnsmasq running
procd: stop /etc/init.d/dnsmasq running - took 0.092586s
v2: rename variables, correct time unit
v3: use CLOCK_MONOTONIC_RAW to prevent issues with NTP and adjtime
Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
|
|
|
|
|
|
| |
Might help with debugging. No size impact.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
| |
Without this change, a process started by procd can have access to
stdout/err of processes started by procd before.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
|
|
|
|
|
|
| |
Fixes: d42b21ed9305 "procd/rcS: Use /dev/null as stdin"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change ensures that /etc/init.d/* scripts are started with
/dev/null as stdin. This is useful in cases where an init.d script
reads (e.g. by mistake) from stdin, which a user can perceive as if
some characters typed into shell on serial console are "eaten" by
something else (i.e. by the init.d script running on background). This
is very annoying, because each character needs to be pressed several
times before it appears on the screen.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
|
|
|
|
|
|
| |
It helps with debugging of initscript problems.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When procd starts a rcS script, it captures its stdout and stderr and
logs them via syslog(). The problem with that is that the rest of
procd code uses ulog rather than syslog() directly and ulog_open()
doesn't call openlog() immediately, but only after something is logged
with ulog(). This lazy calling of openlog() can result in the
following unwanted behavior:
1) When rcS's stdout/err is logged via syslog(), the log identifier is
not set yet (due to openlog() not called) and so the log message
lacks information about source.
2) procd can also log stdout/err from services. When a message from a
service needs to be logged, ulog_open() is called to change the log
identifier to match the service name/PID. After logging the service
messages, ulog_open() is called again the change the identifier
back to "procd". The lazy call to openlog() means that the messages
logged directly with syslog() will be logged with the
identification of the previously logged service and not of the rcS
script that produced the message.
Both problems are fixed by replacing direct call to syslog() with
ULOG_NOTE, which automatically calls openlog() if needed.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
|
|
|
|
|
|
|
| |
Enable procd to restrict the execution time of a rc scripts during shutdown, even
when a script ignores the SIGTERM signal by insisting after 10s with a SIGKILL.
Signed-off-by: Jurgen Van Ham <juvanham.tc@gmail.com>
|
|
|
|
|
|
| |
otherwise LOG_USER/LOG_EMERG is used
Signed-off-by: Ulrich Weber <uw@ocedo.com>
|
|
|
|
|
| |
These should probably not happen in practice, but having an explicit
error message may make debugging out-of-memory situations easier.
|
|
|
|
|
|
|
|
|
|
|
| |
procd has the habit of logging startup/shutdown via
rcS to syslog, which is pointless in case of a
shutdown, and unlikely to be complete on a startup
(as syslog is not running). Write to the console
instead.
Signed-off-by: Michel Stam <m.stam@fugro.nl>
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
|
| |
lets restrict it to stop scripts only
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
|
|
|
| |
split app into procd and init binaries
remove log support, this is an external service now
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
|
|
|
| |
weneed to make sure that we do not run into a deadlock.
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|