1 /* signame.c -- get the name of a signal
3 Copyright 2012 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
13 String
Signame (intgo sig
) __asm__ (GOSYM_PREFIX
"syscall.Signame");
24 #if defined(HAVE_STRSIGNAL)
30 snprintf(buf
, sizeof buf
, "signal %ld", (long) sig
);
33 len
= __builtin_strlen (s
);
34 data
= runtime_mallocgc (len
, 0, FlagNoScan
);
35 __builtin_memcpy (data
, s
, len
);