Changeset b40bfac in mainline for uspace/srv/taskmon/taskmon.c
- Timestamp:
- 2010-11-08T07:13:25Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63a1e60
- Parents:
- d70a463 (diff), 3da12d74 (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
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskmon/taskmon.c
rd70a463 rb40bfac 50 50 static void fault_event(ipc_callid_t callid, ipc_call_t *call) 51 51 { 52 const char *argv[6];53 52 const char *fname; 54 char *dump_fname;55 53 char *s_taskid; 56 const char **s;54 int rc; 57 55 58 56 task_id_t taskid; … … 67 65 } 68 66 67 printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread); 68 69 fname = "/app/taskdump"; 70 71 #ifdef CONFIG_WRITE_CORE_FILES 72 char *dump_fname; 73 69 74 if (asprintf(&dump_fname, "/data/core%" PRIuTASKID, taskid) < 0) { 70 75 printf("Memory allocation failed.\n"); … … 72 77 } 73 78 74 printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread); 75 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; 79 printf(NAME ": Executing %s -c %s -t %s\n", dump_fname, s_taskid); 80 rc = task_spawnl(NULL, fname, fname, "-c", dump_fname, "-t", s_taskid, 81 NULL); 83 82 #else 84 argv[0] = "/app/taskdump"; 85 argv[1] = "-t"; 86 argv[2] = s_taskid; 87 argv[3] = NULL; 83 printf(NAME ": Executing %s -t %s\n", s_taskid); 84 rc = task_spawnl(NULL, fname, fname, "-t", s_taskid, NULL); 88 85 #endif 89 fname = argv[0]; 90 91 printf(NAME ": Executing"); 92 93 s = argv; 94 while (*s != NULL) { 95 printf(" %s", *s); 96 ++s; 86 if (rc != EOK) { 87 printf("%s: Error spawning %s (%s).\n", NAME, fname, 88 str_error(rc)); 97 89 } 98 putchar('\n');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));104 90 } 105 91
Note:
See TracChangeset
for help on using the changeset viewer.