Butuh sekitar 10 detik untuk memulai mc
. Menjalankan strace -r -tt -o mc.strace mc
saya mendapat:
...
0.000023 pipe([7, 8]) = 0
0.000028 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fcad000fa50) = 3332
0.000247 write(5, " PROMPT_COMMAND=${PROMPT_COMMAND"..., 75) = 75
0.000050 rt_sigaction(SIGINT, {0x449960, [], SA_RESTORER, 0x7fcaced23740}, NULL, 8) = 0
0.000034 select(8, [5 7], NULL, NULL, {10, 0}) = 1 (in [5], left {9, 999996})
0.000039 read(5, " PROMPT_COMMAND=${PROMPT_COMMAND"..., 128) = 76
0.000032 select(8, [5 7], NULL, NULL, {9, 999996}) = 1 (in [5], left {9, 985005})
0.015050 read(5, "[yuri@yuri ~] PROM", 128) = 19
0.000031 select(8, [5 7], NULL, NULL, {9, 985005}) = 1 (in [5], left {9, 985001})
0.000036 read(5, "PT_COM", 128) = 6
0.000026 select(8, [5 7], NULL, NULL, {9, 985001}) = 1 (in [5], left {9, 984998})
0.000033 read(5, "MAND=", 128) = 5
0.000026 select(8, [5 7], NULL, NULL, {9, 984998}) = 1 (in [5], left {9, 984995})
0.000033 read(5, "${PR", 128) = 4
0.000025 select(8, [5 7], NULL, NULL, {9, 984995}) = 1 (in [5], left {9, 984992})
0.000034 read(5, "OMPT", 128) = 4
0.000025 select(8, [5 7], NULL, NULL, {9, 984992}) = 1 (in [5], left {9, 984989})
0.000034 read(5, "_COM", 128) = 4
0.000026 select(8, [5 7], NULL, NULL, {9, 984989}) = 1 (in [5], left {9, 984986})
0.000034 read(5, "MAND", 128) = 4
0.000025 select(8, [5 7], NULL, NULL, {9, 984986}) = 1 (in [5], left {9, 984983})
0.000033 read(5, ":+$", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984983}) = 1 (in [5], left {9, 984980})
0.000033 read(5, "PRO", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984980}) = 1 (in [5], left {9, 984977})
0.000033 read(5, "MPT", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984977}) = 1 (in [5], left {9, 984974})
0.000033 read(5, "_CO", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984974}) = 1 (in [5], left {9, 984971})
0.000033 read(5, "MMA", 128) = 3
0.000026 select(8, [5 7], NULL, NULL, {9, 984971}) = 1 (in [5], left {9, 984968})
0.000032 read(5, "ND;", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984968}) = 1 (in [5], left {9, 984965})
0.000033 read(5, " }", 128) = 2
0.000026 select(8, [5 7], NULL, NULL, {9, 984965}) = 1 (in [5], left {9, 984962})
0.000033 read(5, "'pw", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984962}) = 1 (in [5], left {9, 984959})
0.000033 read(5, "d>", 128) = 2
0.000026 select(8, [5 7], NULL, NULL, {9, 984959}) = 1 (in [5], left {9, 984956})
0.000032 read(5, "&8;", 128) = 3
0.000026 select(8, [5 7], NULL, NULL, {9, 984956}) = 1 (in [5], left {9, 984953})
0.000032 read(5, "ki", 128) = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984953}) = 1 (in [5], left {9, 984950})
0.000033 read(5, "ll ", 128) = 3
0.000026 select(8, [5 7], NULL, NULL, {9, 984950}) = 1 (in [5], left {9, 984947})
0.000032 read(5, "-S", 128) = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984947}) = 1 (in [5], left {9, 984944})
0.000033 read(5, "TO", 128) = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984944}) = 1 (in [5], left {9, 984941})
0.000033 read(5, "P ", 128) = 2
0.000025 select(8, [5 7], NULL, NULL, {9, 984941}) = 1 (in [5], left {9, 984938})
0.000033 read(5, "$$", 128) = 2
0.000033 select(8, [5 7], NULL, NULL, {9, 984938}) = 1 (in [5], left {9, 984935})
0.000034 read(5, "'\r\n", 128) = 3
0.000025 select(8, [5 7], NULL, NULL, {9, 984935}) = 1 (in [5], left {9, 984886})
0.000082 read(5, "bash: PROMPT_COMMAND: line 1: sy"..., 128) = 128
0.000033 select(8, [5 7], NULL, NULL, {9, 984886}) = 1 (in [5], left {9, 984882})
0.000071 read(5, "tory -r; ; pwd>&8;kill -STOP $$'"..., 128) = 48
0.000061 select(8, [5 7], NULL, NULL, {9, 984882}) = 0 (Timeout)
9.995037 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7fcaced23740}, NULL, 8) = 0
0.000090 write(1, "\33[?1001s\33[?1002h\33[?1006h", 24) = 24
0.000066 write(1, "\33[?2004h", 8) = 8
0.000034 geteuid() = 1000
0.000064 access("/home/yuri/.config/mc/filehighlight.ini", R_OK) = -1 ENOENT (No such file or directory)
0.000061 access("/etc/mc/filehighlight.ini", R_OK) = 0
0.000042 access("/etc/mc/filehighlight.ini", R_OK) = 0
0.000044 stat("/etc/mc/filehighlight.ini", {st_mode=S_IFREG|0644, st_size=1119, ...}) = 0
0.000035 open("/etc/mc/filehighlight.ini", O_RDONLY) = 9
...
Melihat output ini, saya memutuskan untuk memulai mc
dengan empty PROMPT_COMMAND
( PROMPT_COMMAND= mc
), dan itu dimulai seketika. Seharusnya saya ada di sana:
history -a; history -c; history -r;
UPD Setelah beberapa penggalian lagi, ternyata itu tidak ada hubungannya dengan sejarah ( PROMPT_COMMAND=';' strace -r -tt -o mc.strace -s 1000 mc
):
0.000197 write(5, " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'pwd>&8;kill -STOP $$'\n", 75) = 75
0.000068 rt_sigaction(SIGINT, {0x449960, [], SA_RESTORER, 0x7f12567fc660}, NULL, 8) = 0
0.000049 select(8, [5 7], NULL, NULL, {10, 0}) = 1 (in [5], left {9, 999996})
0.000055 read(5, " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'pwd>&8;kill -STOP $$'\r\n", 128) = 76
0.000050 select(8, [5 7], NULL, NULL, {9, 999996}) = 1 (in [5], left {9, 981008})
0.019073 read(5, "bash: PROMPT_COMMAND: line 0: syntax error near unexpected token `;'\r\nbash: PROMPT_COMMAND: line 0: `;'\r\n", 128) = 105
0.000041 select(8, [5 7], NULL, NULL, {9, 981008}) = 1 (in [5], left {9, 980786})
0.000292 read(5, "[\33[1;30myuri\33[0m@\33[1;33myuri\33[0m ~] PROM", 128) = 41
0.000070 select(8, [5 7], NULL, NULL, {9, 980786}) = 1 (in [5], left {9, 980782})
0.000075 read(5, "PT_COMMAN", 128) = 9
0.000061 select(8, [5 7], NULL, NULL, {9, 980782}) = 1 (in [5], left {9, 980778})
0.000058 read(5, "D=${PRO", 128) = 7
0.000047 select(8, [5 7], NULL, NULL, {9, 980778}) = 1 (in [5], left {9, 980775})
0.000059 read(5, "MPT_CO", 128) = 6
0.000048 select(8, [5 7], NULL, NULL, {9, 980775}) = 1 (in [5], left {9, 980772})
0.000058 read(5, "MMAND", 128) = 5
0.000047 select(8, [5 7], NULL, NULL, {9, 980772}) = 1 (in [5], left {9, 980768})
0.000056 read(5, ":+$P", 128) = 4
0.000047 select(8, [5 7], NULL, NULL, {9, 980768}) = 1 (in [5], left {9, 980764})
0.000057 read(5, "ROMPT", 128) = 5
0.000047 select(8, [5 7], NULL, NULL, {9, 980764}) = 1 (in [5], left {9, 980761})
0.000056 read(5, "_COM", 128) = 4
0.000047 select(8, [5 7], NULL, NULL, {9, 980761}) = 1 (in [5], left {9, 980758})
0.000057 read(5, "MAND", 128) = 4
0.000046 select(8, [5 7], NULL, NULL, {9, 980758}) = 1 (in [5], left {9, 980755})
0.000057 read(5, "; }'", 128) = 4
0.000046 select(8, [5 7], NULL, NULL, {9, 980755}) = 1 (in [5], left {9, 980752})
0.000056 read(5, "pwd>", 128) = 4
0.000047 select(8, [5 7], NULL, NULL, {9, 980752}) = 1 (in [5], left {9, 980749})
0.000057 read(5, "&8;k", 128) = 4
0.000047 select(8, [5 7], NULL, NULL, {9, 980749}) = 1 (in [5], left {9, 980746})
0.000057 read(5, "ill", 128) = 3
0.000058 select(8, [5 7], NULL, NULL, {9, 980746}) = 1 (in [5], left {9, 980743})
0.000057 read(5, " -ST", 128) = 4
0.000046 select(8, [5 7], NULL, NULL, {9, 980743}) = 1 (in [5], left {9, 980740})
0.000058 read(5, "OP ", 128) = 3
0.000046 select(8, [5 7], NULL, NULL, {9, 980740}) = 1 (in [5], left {9, 980736})
0.000056 read(5, "$$'\r\n", 128) = 5
0.000048 select(8, [5 7], NULL, NULL, {9, 980736}) = 1 (in [5], left {9, 980721})
0.000069 read(5, "bash: PROMPT_COMMAND: line 1: syntax error near unexpected token `;;'\r\nbash: PROMPT_COMMAND: line 1: `;; pwd>&8;kill -STOP $$'\r\n", 128) = 128
0.000049 select(8, [5 7], NULL, NULL, {9, 980721}) = 1 (in [5], left {9, 980713})
0.000062 read(5, "[\33[1;30myuri\33[0m@\33[1;33myuri\33[0m ~] ", 128) = 36
0.000047 select(8, [5 7], NULL, NULL, {9, 980713}) = 0 (Timeout)
9.990855 rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7f12567fc660}, NULL, 8) = 0
Konjungtur saya adalah bahwa mc
dengan PROMPT_COMMAND
cara yang salah mengacaukan Itu berubah PROMPT_COMMAND
sehingga jika mengandung ;
, yang memicu kesalahan bash. Dengan demikian, tidak ada yang ditulis untuk deskriptor 8
, yang menghalangi proses sampai batas waktu. Koreksi saya, jika saya salah.
--enable-vfs-smb
? Coba nonaktifkan fitur ini. Tampaknya menjadi masalah umum dengan versi 4.8.4: mc memulai sangat lambat