@Common_Lisper Cのmainのargv[]がもらう内容はexec(3)のargv引数のコピーで、exec(3)には他に実行ファイルを指定する引数があるので、argv[0]には何でも渡せちゃった気がします。シェルから起動したときにはコマンドラインのファイル名かフルパスか、ユーザーがタイプした方が入っていることが多くて、内部的にマルチプロセスにするようなプログラムだとps(1)で見せたい情報を書くのかも。そのうちじっけんすゆ!
@Common_Lisper Cのmainのargv[]がもらう内容はexec(3)のargv引数のコピーで、exec(3)には他に実行ファイルを指定する引数があるので、argv[0]には何でも渡せちゃった気がします。シェルから起動したときにはコマンドラインのファイル名かフルパスか、ユーザーがタイプした方が入っていることが多くて、内部的にマルチプロセスにするようなプログラムだとps(1)で見せたい情報を書くのかも。そのうちじっけんすゆ!
おわー!ミケランジェロは金属メッシュでもうんまーい!蒸らし2分その後3回に分けて2分ずつ置いてお湯を注ぐのどの豆でもおいしく入ってすごい!
あ。弊ぼっちのふぁびこん、団子にしてるつもりだったけどSafariで見ると純正品のやつだ…
https://github.com/zunda/mastodon/commit/6930b05d40c395bd6b49f34b156e981fab5cd024
https://github.com/zunda/mastodon/commit/01863d969d89f153a552aa34e85ca7faa2f3c18b
これ全部書き換えなきゃいけないのか…(めんどうになった←
https://github.com/mastodon/mastodon/tree/main/app/javascript/icons
@tateisu デプロイした先のapp/javascript/icons以下のファイルのsha1をいつくか比べてみましたがレポジトリのものから変化してないみたい。サーバが出してるfaviconは別の場所から取ってきてるのかもですねー
@tateisu ログを確認してみると、
/packs/media/icons/apple-touch-icon-1024x1024-db6849588b44f525363c37b65ef0ac66.png
とか
/packs/media/icons/android-chrome-256x256-7b2b43926019259f7c9ddee627d80a0f.png
とかへのGETリクエストがありました。WebPackerがapp/javascript/icons/*.pngにバージョンのハッシュをつけてpublic/packs/media/icons以下に放り込んでるような気がしてきました。
M1 MacBook Airちゃんでheroku run動くんだけどなにか動いてない疑惑
$ heroku run bash -a zundan-mastodon
Running bash on ⬢ zundan-mastodon... up, run.5486 (Basic)
Error: spawn Unknown system error -86
Code: Unknown system error -86
~ $
NodeはARMの入れてるんだけどなー
Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:413:11)
at spawn (node:child_process:757:9)
at Object.execFile (node:child_process:348:17)
at module.exports.fileCommandJson (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/notifications/node_modules/node-notifier/lib/utils.js:88:13)
at NotificationCenter.notifyRaw (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/notifications/node_modules/node-notifier/notifiers/notificationcenter.js:81:11)
at Object.notify (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/notifications/lib/index.js:8:25)
at Dyno._notify (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/plugin-run/lib/lib/dyno.js:368:29)
at TLSSocket.<anonymous> (/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/plugin-run/lib/lib/dyno.js:282:18)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
/usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/notifications/lib/index.js に
const NodeNotifier = require("node-notifier");
return NodeNotifier.notify(…
みたいな行がある。Dyno起動したよのノーティフィケーションを送るプロセスがインテルぽいんてる?
zsh: bad CPU type in executable: /usr/local/lib/node_modules/heroku/node_modules/@heroku-cli/notifications/node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier
おまえかー
この二度寝からの、卒業
2564117131 (upstream/main) New Crowdin updates (#23625)
f682478de8 Fix inefficiency when searching accounts per username in admin interface (#23801)
3ed1b9ebb6 Fix rack:attack flaky tests and test end of throttle period (#23799)
4ff44be134 Autofix Rubocop Rails/Blank (#23765)
8fd3fc404d Autofix Rubocop Rails/RootPathnameMethods (#23760)
48aeab90f6 Ignore JSX files from Prettier (#23777)
84cc805cae Enable Style/FrozenStringLiteralComment for specs (#23790)
0cfdd1a401 Enable Rubocop Style/StringConcatenation defaults (#23792)
\Master?/ \ますたー/
Merged mastodon/mastodon at 25641171319a9cfde9b837d25bcab077b3d1da6a.
@tateisu ありがとうございます!! app/javascript/images/app-icon.svgとapp/javascript/images/logo.svgをすげかえてbranding:generate_app_iconsするとpngがどばっと書き変わる感じですね
TVerでドラマ見てると時々みょーな虚無の間があって、たぶんテレビでは「この番組は、ご覧のスポンサーの提供で」とか聞こえるんだろうなあと妄想してう
$ ruby -e 'puts "まいにちがにちようび".chars.shuffle.join'
ちまびちういがよにに
このアカウントは、notestockで公開設定になっていません。
@Common_Lisper じっけんしました!! psはオプションによって表示するコマンド名が違うんですねえ
$ cat main.c
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
void main(int argc, char *argv[])
{
pid_t pid;
char *arg;
arg = argv[1] ? argv[1] : argv[0];
printf("argv[0]: %s\n", argv[0]);
pid = fork();
if (pid) {
/* parent */
printf("a child with argv[0]: %s is sleeping for 60 sec at pid: %d\n", arg, pid);
} else {
/* child */
execl("/usr/bin/sleep", arg, "60", NULL);
}
}
$ gcc main.c && { ./a.out ねてる; `pwd`/a.out ねてるってば; }
argv[0]: ./a.out
a child with argv[0]: ねてる is sleeping for 60 sec at pid: 21227
argv[0]: /tmp/a.out
a child with argv[0]: ねてるってば is sleeping for 60 sec at pid: 21230
$ ps
PID TTY TIME CMD
:
21227 pts/2 00:00:00 sleep
21230 pts/2 00:00:00 sleep
:
$ ps x
PID TTY STAT TIME COMMAND
:
21227 pts/2 S 0:00 ねてる 60
21230 pts/2 S 0:00 ねてるってば 60
:
@Common_Lisper じっけんしました!! psはオプションによって表示するコマンド名が違うんですねえ
$ cat main.c
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
void main(int argc, char *argv[])
{
pid_t pid;
char *arg;
arg = argv[1] ? argv[1] : argv[0];
printf("argv[0]: %s\n", argv[0]);
pid = fork();
if (pid) {
/* parent */
printf("a child with argv[0]: %s is sleeping for 60 sec at pid: %d\n", arg, pid);
} else {
/* child */
execl("/usr/bin/sleep", arg, "60", NULL);
}
}
$ gcc main.c && { ./a.out ねてる; `pwd`/a.out ねてるってば; }
argv[0]: ./a.out
a child with argv[0]: ねてる is sleeping for 60 sec at pid: 21227
argv[0]: /tmp/a.out
a child with argv[0]: ねてるってば is sleeping for 60 sec at pid: 21230
$ ps
PID TTY TIME CMD
:
21227 pts/2 00:00:00 sleep
21230 pts/2 00:00:00 sleep
:
$ ps x
PID TTY STAT TIME COMMAND
:
21227 pts/2 S 0:00 ねてる 60
21230 pts/2 S 0:00 ねてるってば 60
:
このアカウントは、notestockで公開設定になっていません。
イン蟹でやりたいこと
・インターネット蟹工船記念競争(競馬・競輪などの公営ギャンブル冠競争レース)
・インターネット蟹工船一坪共有地
日本国内マストドンサーバ半額のきうんかと思ったら量子コンピューターってえええぇ??
https://www.nikkei.com/article/DGXZQOUA21BAM0R20C23A2000000/
オチは会員限定の中にあるのかな?
このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。
弊ぼっちのはびこんがたぶん全部だんごになりました!色味がいまいちだったけどまあいいや←
CreateInstanceOnHeroku · zunda/mastodon Wiki · GitHub https://github.com/zunda/mastodon/wiki/CreateInstanceOnHeroku#favicon%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B
このアカウントは、notestockで公開設定になっていません。
/admin/dashboardを開いた時にConsoleに表示されるエラーは、
Cannot load script https:// mastodon.zunda.ninja/packs/js/admin-afd0d262cd86f2bd7df8.chunk.js. Failed integrity metadata check. Content length: 6481, Expected content length: -1, Expected metadata: sha256-kxZ0mHahEaDwMeMcR3QS/sGNBkGwEDlaX7dHAZ3ZUBM=
参照元は
<script src="/packs/js/admin-afd0d262cd86f2bd7df8.chunk.js" crossorigin="anonymous" async="async" integrity="sha256-kxZ0mHahEaDwMeMcR3QS/sGNBkGwEDlaX7dHAZ3ZUBM="></script>
のようだ。おっと、スクリプトのURLからは404が返るね。
デプロイ先に実際にあるファイルは public/packs/js/admin-afd0d262cd86f2bd7df8.chunk.js で、ハッシュの部分が違っている。
@tadd @Common_Lisper 今手近にUbuntu 20.04.5しかなかったのですが、ちょっと検索してprctl(2)を使えそうなことがわかりました。これはPOSIXではないみたい。
$ cat main.c
#include <unistd.h>
#include <sys/prctl.h>
void main(void)
{
prctl(PR_SET_NAME, "寝てるよ");
sleep(60);
}
$ gcc main.c
$ ./a.out &
$ ps
PID TTY TIME CMD
141793 pts/0 00:00:00 bash
141991 pts/0 00:00:00 寝てるよ
141992 pts/0 00:00:00 ps
argv[0]に代入するのは何か壊しそうですよねw
$ cat main.c
#include <unistd.h>
#include <string.h>
void main(int argc, char *argv[])
{
strcpy(argv[0], "寝てるよ");
sleep(60);
}
$ gcc main.c
$ ./a.out &
$ ps
PID TTY TIME CMD
141793 pts/0 00:00:00 bash
142011 pts/0 00:00:00 a.out
142012 pts/0 00:00:00 ps
って効かなかったw
このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。
@tadd setprogname(3)、Venturaで通ったんですが何が変わったかわからない感じです…(なおgccはclang
$ gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ cat main.c
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
setprogname("sleeping");
sleep(100);
return 0;
}
$ gcc main.c
$ ./a.out&
[1] 1540
$ ps x | grep 1540
1540 s001 SN 0:00.00 ./a.out
1544 s001 S+ 0:00.00 grep 1540
このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。
このアカウントは、notestockで公開設定になっていません。