File: getsid.c

package info (click to toggle)
gpsd 3.11-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,408 kB
  • ctags: 5,574
  • sloc: ansic: 41,946; xml: 7,545; python: 6,429; sh: 1,016; cpp: 218; makefile: 210; php: 191; perl: 158
file content (19 lines) | stat: -rw-r--r-- 517 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * This file plugs a hole in Bionic, a derivation of the BSD standard C library
 * code that was originally developed by Google for Android.
 *
 * This file is Copyright (c) 2010 by the GPSD project
 * BSD terms apply: see the file COPYING in the distribution root for details.
 */
#include "gpsd_config.h"

#ifndef HAVE_GETSID
#include <unistd.h>
#include <sys/syscall.h>

/* This implementation is required for Android */

pid_t getsid(pid_t pid) {
  return syscall(__NR_getsid, pid);
}
#endif /* HAVE_GETSID */