Changeset c47e1a8 in mainline for uspace/srv/taskmon/taskmon.c
- Timestamp:
- 2010-05-21T07:50:04Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/srv/taskmon/taskmon.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskmon/taskmon.c
rcf8cc36 rc47e1a8 44 44 #include <macros.h> 45 45 #include <errno.h> 46 #include <str_error.h> 46 47 47 48 #define NAME "taskmon" … … 49 50 static void fault_event(ipc_callid_t callid, ipc_call_t *call) 50 51 { 51 c har *argv[11];52 c har *fname;52 const char *argv[6]; 53 const char *fname; 53 54 char *dump_fname; 54 55 char *s_taskid; 55 c har **s;56 const char **s; 56 57 57 58 task_id_t taskid; … … 66 67 } 67 68 68 if (asprintf(&dump_fname, "/ scratch/d" PRIuTASKID ".txt", taskid) < 0) {69 if (asprintf(&dump_fname, "/data/core%" PRIuTASKID, taskid) < 0) { 69 70 printf("Memory allocation failed.\n"); 70 71 return; … … 73 74 printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread); 74 75 75 #ifdef CONFIG_VERBOSE_DUMPS 76 argv[0] = "/app/redir"; 77 argv[1] = "-i"; 78 argv[2] = "/readme"; 79 argv[3] = "-o"; 80 argv[4] = dump_fname; 81 argv[5] = "--"; 82 argv[6] = "/app/taskdump"; 83 argv[7] = "-m"; 84 argv[8] = "-t"; 85 argv[9] = s_taskid; 86 argv[10] = NULL; 76 #ifdef CONFIG_WRITE_CORE_FILES 77 argv[0] = "/app/taskdump"; 78 argv[1] = "-c"; 79 argv[2] = dump_fname; 80 argv[3] = "-t"; 81 argv[4] = s_taskid; 82 argv[5] = NULL; 87 83 #else 88 84 argv[0] = "/app/taskdump"; … … 94 90 95 91 printf(NAME ": Executing"); 96 s = argv; 92 93 s = argv; 97 94 while (*s != NULL) { 98 95 printf(" %s", *s); … … 100 97 } 101 98 putchar('\n'); 102 103 if (!task_spawn(fname, argv)) 104 printf(NAME ": Error spawning taskdump.\n", fname); 99 100 int err; 101 if (!task_spawn(fname, argv, &err)) 102 printf("%s: Error spawning %s (%s).\n", NAME, fname, 103 str_error(err)); 105 104 } 106 105
Note:
See TracChangeset
for help on using the changeset viewer.
