Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 211341 Details for
Bug 312361
"[exe]" ("exe") as a process name for missing argv[0]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Testcase.
missing-argv.c (text/plain), 790 bytes, created by
Jan Kratochvil
on 2007-09-29 14:38:28 UTC
(
hide
)
Description:
Testcase.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2007-09-29 14:38:28 UTC
Size:
790 bytes
patch
obsolete
>#define _GNU_SOURCE >#include <unistd.h> >#include <stdio.h> >#include <stdlib.h> >#include <assert.h> >#include <string.h> > >int main (int argc, char **argv) >{ > FILE *f; > ssize_t got; > char *line = NULL; > size_t n; > const char expect[]="Name:\t"; > char *out, *s; > > if (argc > 0) > { > execl ("/proc/self/exe", NULL, NULL); > abort (); > } > f = fopen ("/proc/self/status", "r"); > assert (f != NULL); > got = getline (&line, &n, f); > assert (got > 0); > assert (memcmp (line, expect, sizeof expect - 1) == 0); > out = line + sizeof expect - 1; > s = strchr (out, '\n'); > assert (s != NULL); > *s = 0; > > puts (out); > if (strcmp (out, "exe") == 0) > { > puts ("FAIL"); > return 1; > } > else > { > puts ("PASS"); > return 0; > } > /* NOTREACHED */ >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 312361
: 211341