1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:57:49 +00:00

SoundPlayer: Added 'shared_buffer' to pledge

This fixes a crash that occured when opening a file due to not pledging 'shared_buffer'
This commit is contained in:
Marco Cutecchia 2021-01-16 22:39:42 +01:00 committed by Andreas Kling
parent 0571125dfe
commit 14f075b26d

View file

@ -37,14 +37,14 @@
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
if (pledge("stdio recvfd sendfd accept rpath thread unix cpath fattr", nullptr) < 0) { if (pledge("stdio recvfd sendfd accept rpath thread unix cpath fattr shared_buffer", nullptr) < 0) {
perror("pledge"); perror("pledge");
return 1; return 1;
} }
auto app = GUI::Application::construct(argc, argv); auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio recvfd sendfd accept rpath thread unix", nullptr) < 0) { if (pledge("stdio recvfd sendfd accept rpath thread unix shared_buffer", nullptr) < 0) {
perror("pledge"); perror("pledge");
return 1; return 1;
} }
@ -52,7 +52,7 @@ int main(int argc, char** argv)
auto audio_client = Audio::ClientConnection::construct(); auto audio_client = Audio::ClientConnection::construct();
audio_client->handshake(); audio_client->handshake();
if (pledge("stdio recvfd sendfd accept rpath thread", nullptr) < 0) { if (pledge("stdio recvfd sendfd accept rpath thread shared_buffer", nullptr) < 0) {
perror("pledge"); perror("pledge");
return 1; return 1;
} }