X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fsubprocs.c;h=527f379d4b5278ff1b3df095a7d2539e6a93bcd8;hb=6cee540bdbb571485cd5e519f89f389faebd0495;hp=ec2718de03fe1686ec86f5bad6c2ac08555128df;hpb=c28aecf9fc41e3a03494bacf7279745425e2fa18;p=xscreensaver diff --git a/driver/subprocs.c b/driver/subprocs.c index ec2718de..527f379d 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -1,5 +1,5 @@ /* subprocs.c --- choosing, spawning, and killing screenhacks. - * xscreensaver, Copyright (c) 1991-2002 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-2003 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -88,6 +88,12 @@ extern saver_info *global_si_kludge; /* I hate C so much... */ static void limit_subproc_memory (int address_space_limit, Bool verbose_p) { + +/* This has caused way more problems than it has solved... + Let's just completely ignore the "memoryLimit" option now. + */ +#undef HAVE_SETRLIMIT + #if defined(HAVE_SETRLIMIT) && defined(RLIMIT_AS) struct rlimit r; @@ -661,6 +667,11 @@ spawn_screenhack_1 (saver_screen_info *ssi, Bool first_time_p) /* No hacks at all */ new_hack = -1; } + else if (p->screenhacks_count == 1) + { + /* Exactly one hack in the list */ + new_hack = 0; + } else if (si->selection_mode == -1) { /* Select the next hack, wrapping. */