diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-02-15 12:59:48 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-02-16 17:24:48 +0100 |
commit | bb149ecda21a4f9b102245ffc6a2870592d32c0b (patch) | |
tree | f4a18de854d8f77dfc66431c3a3cd0c5804b1146 /include | |
parent | 4f1128fcbd462fc5b7fe900d2daa09576e308736 (diff) |
logging: gsmtap: Fill PID field for each message
It was recently discovered that PID field in gsmtap log messages was
always set to 0. Before this patch, the field was never being set.
The approach of this patch is to record the PID of process one, in
order to avoid calling getpid() syscall on each
log line to be sent. The counterpart of this optimization is that
eventual fork() calls would still keep the old incorrect value, but I
think nobody can safely assume that fork() is possible once all this
kind of infrastructure has already been configured (fork() should only
be done really at the start of the program before any osmocom foo is
initialized, or to immediatelly call exec()).
Related: OS#5027
Change-Id: I7db00d1810f0860166bffa0bda8566caa82e06a9
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions