alpine 3.6
obsolete weakness #51


Weakness Breakdown


An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:



The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

paned_close_childs (void)
  guint i;
  struct shmid_ds buf;
  gboolean is_running = TRUE;

  if (tabs[1].pid != -1)
    kill (tabs[1].pid, SIGUSR2);
  if (tabs[2].pid != -1)
    kill (tabs[2].pid, SIGUSR2);

  /* wait for stop subprocesses */
  while (is_running)
      is_running = FALSE;
      for (i = 1; i <= 3; i++)
          if (tabs[i].pid != -1 && kill (tabs[i].pid, 0) == 0)
              is_running = TRUE;
      usleep (1000);

  /* cleanup shared memory */
  shmctl (tabs[0].pid, IPC_RMID, &buf);
  shmdt (tabs);

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.