On Fri, 2011-11-04 at 00:55 +0100, Guillem Jover wrote:
> Hi!
...
> > + *-gnu*)
> > +AC_DEFINE(PLATFORM_GNU, 1, [Define if you are compiling for *GNU])
> > +;;
...
> If you add this, no platform specific code is being used, so it should
> not build as it stops using the fallback unknown pl
Hi!
On Tue, 2011-11-01 at 23:25:13 +0100, Svante Signell wrote:
> On Tue, 2011-11-01 at 22:30 +0100, Guillem Jover wrote:
> > and then use HAVE_GETDTABLESIZE. Also if there's no limit (-1) it's a
> > bit harsh to exit(1). I'd code this for example like:
>
> I did not realize that -1 meant unlimit
On Tue, 2011-11-01 at 22:30 +0100, Guillem Jover wrote:
> On Tue, 2011-11-01 at 15:57:53 +0100, Svante Signell wrote:
..
> __USE_BSD is an internal macro used by glibc and should not be relied
> on. Add a check to configure.ac instead, something like this:
>
> AC_CHECK_FUNCS([getdtablesize])
Ok,
On Tue, 2011-11-01 at 15:57:53 +0100, Svante Signell wrote:
> Updated code snippet below, OK?
>
> void bg(void)
> {
> int i, fdmax;
[...]
> /* Close probably all file descriptors */
> #ifdef __USE_BSD
> if ((fdmax = getdtablesize()) == -1) exit(1);
> #else
> if ((fd
On Tue, 2011-11-01 at 13:34 +0100, Guillem Jover wrote:
> On Tue, 2011-11-01 at 11:49:48 +0100, Svante Signell wrote:
> > In package uptimed-0.3.16 the following function is defined:
> > void bg(void)
Updated code snippet below, OK?
void bg(void)
{
int i, fdmax;
/* Simple fork to
Hi,
On Tue, Nov 01, 2011 at 11:49:48AM +0100, Svante Signell wrote:
> In package uptimed-0.3.16 the following function is defined:
BTW, I had a look at uptimed before, and the main problem I faced
(IIRC), was making it crash safe. uptimed is writing the current uptime
into a file, and even on GN
On Tue, 2011-11-01 at 11:49:48 +0100, Svante Signell wrote:
> In package uptimed-0.3.16 the following function is defined:
> void bg(void)
> {
[...]
> /* Close probably all file descriptors */
> for (i = 0; i close(i);
[...]
> }
> Two questions arrives after discuss