--- rxvt-unicode/src/rxvtd.C 2009/02/02 22:38:40 1.47 +++ rxvt-unicode/src/rxvtd.C 2009/05/08 23:52:55 1.48 @@ -278,10 +278,10 @@ } #if ENABLE_MLOCK - // Optionally preform a mlockall so this process does not get swapped out. - if (opt_lock && pid == 0) - if (mlockall(MCL_CURRENT | MCL_FUTURE) == -1) - perror("unable to lock into ram"); + // Optionally perform an mlockall so this process does not get swapped out. + if (opt_lock && !pid) + if (mlockall (MCL_CURRENT | MCL_FUTURE) < 0) + perror ("unable to lock into ram"); #endif if (opt_fork)