Lines Matching defs:proc
35 /* For parsing /proc */
345 /* Returns processes listed in /proc with the desired name */
346 static int find_pid(DIR *proc, const char *wanted_name)
351 /* First scan proc for the gpm process */
353 while ( (pid == 0) && ((entry=readdir(proc)) != NULL) ) {
359 SDL_snprintf(path, SDL_arraysize(path), "/proc/%s/status", entry->d_name);
379 DIR *proc;
394 proc = opendir("/proc");
395 if ( proc ) {
398 while ( !available && (pid=find_pid(proc, "gpm")) > 0 ) {
399 SDL_snprintf(path, SDL_arraysize(path), "/proc/%d/cmdline", pid);
433 closedir(proc);