mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-04 16:08:22 +00:00
26 lines
587 B
C
26 lines
587 B
C
/* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
|
|
/* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
|
|
|
|
#include <shim_table.h>
|
|
#include <errno.h>
|
|
|
|
int main (int argc, char ** argv)
|
|
{
|
|
pid_t pid = shim_vfork();
|
|
|
|
if (pid < 0) {
|
|
shim_write(1, "failed on fork\n", 15);
|
|
shim_exit_group(-1);
|
|
}
|
|
|
|
if (pid == 0) {
|
|
shim_write(1, "Hello, Dad!\n", 12);
|
|
}
|
|
else {
|
|
shim_write(1, "Hello, Kid!\n", 12);
|
|
}
|
|
|
|
shim_exit_group(0);
|
|
return 0; // should not reach here.
|
|
}
|