diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 73a72f530..bcbef12d8 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -618,13 +618,8 @@ fork () if (!grouped.errmsg) syscall_printf ("fork failed - child pid %d, errno %d", grouped.child_pid, grouped.this_errno); else - { - char buf[strlen (grouped.errmsg) + sizeof ("child %d - , errno 4294967295 ")]; - strcpy (buf, "child %d - "); - strcat (buf, grouped.errmsg); - strcat (buf, ", errno %d"); - system_printf (buf, grouped.child_pid, grouped.this_errno); - } + system_printf ("child %d - %s, errno %d", grouped.child_pid, + grouped.errmsg, grouped.this_errno); set_errno (grouped.this_errno); }