summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/POSIX/read.c
blob: 133c8f4498e728717f900e8be7794e793a642a7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (c) 2009 by
 * Ralf Corsépius, Ulm, Germany. All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * is freely granted, provided that this notice is preserved.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <unistd.h>

int main(void)
{
  int fd = 42;
  char buf[4];
  ssize_t len;

  len = read(fd, &buf, 4);

  return (len != 0);
}