Changeset bf60110 in git for Singular


Ignore:
Timestamp:
Nov 8, 2013, 1:35:41 PM (10 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
abb12f44bb1ce32fc8fa27a5f627543824466fce
Parents:
1101a8c509d91a9d258834579976809a01834fd2
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2013-11-08 13:35:41+01:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2013-11-08 15:20:33+01:00
Message:
chg: raise RLIMIT_NPROC if necessary for fork()
(cherry picked from commit 4f397cf7bc1b07f8c0dd8cab10d1311de491db21)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/ssiLink.cc

    r1101a8 rbf60110  
    3838#include <libpolys/misc/options.h>
    3939#include <kernel/timer.h>
     40#include <Singular/rlimit.h>
    4041#include <Singular/subexpr.h>
    4142#include <Singular/links/silink.h>
     
    779780        pipe(pc);
    780781        pipe(cp);
    781         pid_t pid=fork();
     782        pid_t pid = fork();
     783        if (pid == -1 && errno == EAGAIN)   // RLIMIT_NPROC too low?
     784        {
     785          raise_rlimit_nproc();
     786          pid = fork();
     787        }
     788        if (pid == -1)
     789        {
     790          WerrorS("could not fork");
     791        }
    782792        if (pid==0) /*fork: child*/
    783793        {
Note: See TracChangeset for help on using the changeset viewer.