D16218: [KDevelop/Core]: safe signal-handler implementation
Aaron Puchert
noreply at phabricator.kde.org
Sun Nov 18 21:30:39 GMT 2018
aaronpuchert added inline comments.
INLINE COMMENTS
> core.cpp:78-80
> +#ifdef SIGHUP
> + && sig != SIGHUP
> +#endif
Why that? Can't we take the time for an orderly shutdown on SIGHUP?
> core.cpp:333
>
> - installSignalHandler();
> +// A "proper" exit-on-signal approach:
> +// Open a pipe or an eventfd, then install your signal handler. In that signal
Isn't the indentation a bit weird?
> core.cpp:399
> + close(signalPipeRead);
> + }
> }
Maybe `signalPipeRead = -1` as well?
> core.cpp:438-444
> +#ifdef OPEN_MAX
> + // set the maximum number of files
> + struct rlimit rlim;
> + getrlimit(RLIMIT_NOFILE, &rlim);
> + rlim.rlim_cur = qMin(rlim_t(OPEN_MAX), rlim.rlim_max);
> + setrlimit(RLIMIT_NOFILE, &rlim);
> +#endif
Looks unrelated to me. What does this have to do with signal handling?
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D16218
To: rjvbb, #kdevelop, kfunk, aaronpuchert
Cc: aaronpuchert, brauch, kfunk, arrowd, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181118/debecb47/attachment-0001.html>
More information about the KDevelop-devel
mailing list