#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
chmod a+x foo.sh bar
cat > baz.c <<'END'
+#include <stdio.h>
#include <unistd.h>
int main (void)
{
- write (9, " bazbazbaz\n", 11);
- return 0;
+ ssize_t res = write (9, " bazbazbaz\n", 11);
+ if (res < 0)
+ perror("write failed");
+ return res != 11;
}
END
cat > zardoz.c <<'END'
+#include <stdio.h>
#include <unistd.h>
int main (void)
{
- write (9, " quxquxqux\n", 11);
- return 0;
+ ssize_t res = write (9, " quxquxqux\n", 11);
+ if (res < 0)
+ perror("write failed");
+ return res != 11;
}
END