On Mon, 24.08.09 18:50, Ansgar Johannes Pflipsen (pflipsen@xxxxxxxxxxxxxxxxx) wrote: > errno = 0; > getgrnam_r(group, &grbuf, buf, buflen, &gr); > if (gr != NULL) > gid = gr->gr_gid; > else if (errno == ERANGE) { > buflen *= 2; <<-- 0 * 2 = 0 > continue; > } One little comment here: on POSIX getrnam_r() doesn't touch errno. Instead it returns the error value as return value. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4 -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html