History log of /openbsd/usr.sbin/httpd/proc.c (Results 1 – 25 of 45)
Revision Date Author Comments
# 2269e292 09-Apr-2024 tobhe <tobhe@openbsd.org>

Sync removal of setsid(), setpgid() and a few dup2() from relayd. They are
redundant since we call daemon() earlier.

ok bluhm@


# 4c131d56 08-Apr-2024 tobhe <tobhe@openbsd.org>

Call daemon() only in parent and before proc_exec() to avoid orphaning child
processes. Synced from relayd.

ok kn@


# 3cc21533 17-Jan-2024 claudio <claudio@openbsd.org>

Convert to use imsg_get_fd() since proc_forward_imsg() never forwards a
file descriptor just use -1 there.
OK tb@


# c1868907 15-Feb-2023 tobhe <tobhe@openbsd.org>

proc_ispeer() is not used anywhere anymore so remove it everywhere.

ok florian@ bluhm@
ok for vmd mlarkin@


# f2de6a3f 04-Dec-2021 florian <florian@openbsd.org>

Do not setup pipes between SERVER processes, they don't talk to each
other. Since this generates a full mesh, the amount of filedescriptors
needed grows quadratically with the amount of configured pr

Do not setup pipes between SERVER processes, they don't talk to each
other. Since this generates a full mesh, the amount of filedescriptors
needed grows quadratically with the amount of configured prefork
processes.

Might fix an out of filedescriptor bug that beck is seeing.
OK benno

show more ...


# c5fa57f5 20-Apr-2021 dv <dv@openbsd.org>

Move TAILQ initialization to files where they are used.

These priv-sep daemons all follow a similar design and use TAILQs
for tracking control process connections. In most cases, the TAILQs
are init

Move TAILQ initialization to files where they are used.

These priv-sep daemons all follow a similar design and use TAILQs
for tracking control process connections. In most cases, the TAILQs
are initialized separate from where they are used. Since the scope
of use is generally confined to a specific control process file,
this commit also removes any extern definitions and exposing the
TAILQ structures to other compilation units.

ok bluhm@, tb@

show more ...


# 6ab3e2c7 03-Aug-2020 benno <benno@openbsd.org>

remove tautological condition
from Ross L Richardson <openbsd AT rlr DOT id DOT au>, Thanks
ok claudio@


# 38b34180 09-Sep-2018 bluhm <bluhm@openbsd.org>

During the fork+exec implementation, daemon(3) was moved after
proc_init(). As a consequence httpd(8) and relayd(8) child processes
did not detach from the terminal anymore. Dup /dev/null to the
st

During the fork+exec implementation, daemon(3) was moved after
proc_init(). As a consequence httpd(8) and relayd(8) child processes
did not detach from the terminal anymore. Dup /dev/null to the
stdio file descriptors in the children.
OK benno@

show more ...


# a3d8d4e4 28-May-2017 benno <benno@openbsd.org>

use __func__ in log messages.
From Hiltjo Posthuma hiltjo -AT codemadness -DOT- org, thanks!
ok florian, claudio


# 7df7ca81 17-Jan-2017 krw <krw@openbsd.org>

Nuke some whitespace that keeps poking me in the eye as I try to
steal code.


# 871fc12c 09-Jan-2017 reyk <reyk@openbsd.org>

Stop accessing verbose and debug variables from log.c directly.

This replaces log_verbose() and "extern int verbose" with the two functions
log_setverbose() and log_getverbose().

Pointed out by ben

Stop accessing verbose and debug variables from log.c directly.

This replaces log_verbose() and "extern int verbose" with the two functions
log_setverbose() and log_getverbose().

Pointed out by benno@
OK krw@ eric@ gilles@ (OK gilles@ for the snmpd bits as well)

show more ...


# 93c3ddf9 12-Oct-2016 reyk <reyk@openbsd.org>

Prevent fd exhaustion in the parent when loading the listening server
sockets by sending the fd one-by-one. This allows to start httpd with
max 32 server instances and many server sockets without ch

Prevent fd exhaustion in the parent when loading the listening server
sockets by sending the fd one-by-one. This allows to start httpd with
max 32 server instances and many server sockets without changing the
default rlimits in any way.

OK rzalamena@

show more ...


# 04617fab 10-Oct-2016 rzalamena <rzalamena@openbsd.org>

Modify httpd(8)'s proc.c to use less file descriptors during the daemon
start up. To achieve this proc_init() initiates only the necessary pipes
between child and parent, allocate and distribute fds

Modify httpd(8)'s proc.c to use less file descriptors during the daemon
start up. To achieve this proc_init() initiates only the necessary pipes
between child and parent, allocate and distribute fds in proc_connect().

In case of configuration checks ('-n') we do nothing in proc_init() and
proc_connect().

ok reyk@

show more ...


# 6296db85 10-Oct-2016 rzalamena <rzalamena@openbsd.org>

Fix msgbuf_write() usage idiom and modify the treatment for socket close
to exit gracefully instead of fatal()ing.

ok reyk@


# e9f9523e 10-Oct-2016 rzalamena <rzalamena@openbsd.org>

Add more context to fatal*() messages so it makes easier to debug proc.c
internals.

ok phessler@


# 2584ffbf 05-Oct-2016 rzalamena <rzalamena@openbsd.org>

Check if oldd == newd before dup2(), if that is the case we need to remove
the CLOEXEC flag ourselves.

ok bluhm@, deraadt@


# 3c33e3d6 05-Oct-2016 reyk <reyk@openbsd.org>

Call setsid() to create a new session for the executed processes.

From deraadt@
OK rzalamena@


# 1b81e077 05-Oct-2016 reyk <reyk@openbsd.org>

sync proc.c with vmd: add p_pw to specify a non-standard user for a process.

OK rzalamena@


# 69b8d8bc 28-Sep-2016 reyk <reyk@openbsd.org>

sync proc.c from switchd, includes minor cast qual fix and removal of p_env.


# 8e01c6e3 03-Sep-2016 reyk <reyk@openbsd.org>

Replace [RELAY|SERVER]_MAXPROC with the new PROC_MAX_INSTANCES
variable and limit it from 128 to 32 instances (the old value).
While here, move a few PROC_ defines around.

OK rzalamena@


# aa2d7030 03-Sep-2016 reyk <reyk@openbsd.org>

Use DPRINTF instead of #ifdef DEBUG + log_debug().

Pointed out by benno@


# 71b294e4 02-Sep-2016 reyk <reyk@openbsd.org>

proc.c tweaks: Rename proc_listento() to proc_accept() as it is the
receiving side of proc_connect(). Move some code from main into
proc_init(), the function is now called by parent and children, no

proc.c tweaks: Rename proc_listento() to proc_accept() as it is the
receiving side of proc_connect(). Move some code from main into
proc_init(), the function is now called by parent and children, not
just the parent and it is less copy + paste for other daemons.

OK florian@

show more ...


# 160c0f4d 01-Sep-2016 reyk <reyk@openbsd.org>

Don't print "lost child" if the child process exited okay. This is
the old behaviour and unbreaks the regress tests.


# 8ea811cd 01-Sep-2016 reyk <reyk@openbsd.org>

spacing


# 9409a5ef 01-Sep-2016 reyk <reyk@openbsd.org>

Adjust log message, use process title now that it works again


12