aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 67c9bd90df7..1e3b9f12128 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -3050,7 +3050,7 @@ system_process_attributes (Lisp_Object pid)
3050 struct timespec tnow, tstart, tboot, telapsed, us_time; 3050 struct timespec tnow, tstart, tboot, telapsed, us_time;
3051 double pcpu, pmem; 3051 double pcpu, pmem;
3052 Lisp_Object attrs = Qnil; 3052 Lisp_Object attrs = Qnil;
3053 Lisp_Object cmd_str, decoded_cmd; 3053 Lisp_Object decoded_cmd;
3054 ptrdiff_t count; 3054 ptrdiff_t count;
3055 3055
3056 CHECK_NUMBER_OR_FLOAT (pid); 3056 CHECK_NUMBER_OR_FLOAT (pid);
@@ -3107,7 +3107,7 @@ system_process_attributes (Lisp_Object pid)
3107 else 3107 else
3108 q = NULL; 3108 q = NULL;
3109 /* Command name is encoded in locale-coding-system; decode it. */ 3109 /* Command name is encoded in locale-coding-system; decode it. */
3110 cmd_str = make_unibyte_string (cmd, cmdsize); 3110 AUTO_STRING_WITH_LEN (cmd_str, cmd, cmdsize);
3111 decoded_cmd = code_convert_string_norecord (cmd_str, 3111 decoded_cmd = code_convert_string_norecord (cmd_str,
3112 Vlocale_coding_system, 0); 3112 Vlocale_coding_system, 0);
3113 attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs); 3113 attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs);
@@ -3240,7 +3240,7 @@ system_process_attributes (Lisp_Object pid)
3240 sprintf (cmdline, "[%.*s]", cmdsize, cmd); 3240 sprintf (cmdline, "[%.*s]", cmdsize, cmd);
3241 } 3241 }
3242 /* Command line is encoded in locale-coding-system; decode it. */ 3242 /* Command line is encoded in locale-coding-system; decode it. */
3243 cmd_str = make_unibyte_string (q, nread); 3243 AUTO_STRING_WITH_LEN (cmd_str, q, nread);
3244 decoded_cmd = code_convert_string_norecord (cmd_str, 3244 decoded_cmd = code_convert_string_norecord (cmd_str,
3245 Vlocale_coding_system, 0); 3245 Vlocale_coding_system, 0);
3246 unbind_to (count, Qnil); 3246 unbind_to (count, Qnil);
@@ -3375,13 +3375,13 @@ system_process_attributes (Lisp_Object pid)
3375 make_float (100.0 / 0x8000 * pinfo.pr_pctmem)), 3375 make_float (100.0 / 0x8000 * pinfo.pr_pctmem)),
3376 attrs); 3376 attrs);
3377 3377
3378 decoded_cmd = (code_convert_string_norecord 3378 AUTO_STRING (fname, pinfo.pr_fname);
3379 (build_unibyte_string (pinfo.pr_fname), 3379 decoded_cmd = code_convert_string_norecord (fname,
3380 Vlocale_coding_system, 0)); 3380 Vlocale_coding_system, 0);
3381 attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs); 3381 attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs);
3382 decoded_cmd = (code_convert_string_norecord 3382 AUTO_STRING (psargs, pinfo.pr_psargs);
3383 (build_unibyte_string (pinfo.pr_psargs), 3383 decoded_cmd = code_convert_string_norecord (psargs,
3384 Vlocale_coding_system, 0)); 3384 Vlocale_coding_system, 0);
3385 attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs); 3385 attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs);
3386 } 3386 }
3387 unbind_to (count, Qnil); 3387 unbind_to (count, Qnil);
@@ -3446,9 +3446,8 @@ system_process_attributes (Lisp_Object pid)
3446 if (gr) 3446 if (gr)
3447 attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs); 3447 attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs);
3448 3448
3449 decoded_comm = (code_convert_string_norecord 3449 AUTO_STRING (comm, proc.ki_comm);
3450 (build_unibyte_string (proc.ki_comm), 3450 decoded_comm = code_convert_string_norecord (comm, Vlocale_coding_system, 0);
3451 Vlocale_coding_system, 0));
3452 3451
3453 attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs); 3452 attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs);
3454 { 3453 {
@@ -3559,10 +3558,9 @@ system_process_attributes (Lisp_Object pid)
3559 args[i] = ' '; 3558 args[i] = ' ';
3560 } 3559 }
3561 3560
3562 decoded_comm = 3561 AUTO_STRING (comm, args);
3563 (code_convert_string_norecord 3562 decoded_comm = code_convert_string_norecord (comm,
3564 (build_unibyte_string (args), 3563 Vlocale_coding_system, 0);
3565 Vlocale_coding_system, 0));
3566 3564
3567 attrs = Fcons (Fcons (Qargs, decoded_comm), attrs); 3565 attrs = Fcons (Fcons (Qargs, decoded_comm), attrs);
3568 } 3566 }