This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.data.linkup; | |
import android.Manifest; | |
import android.app.ActivityManager; | |
import android.content.ClipData; | |
import android.content.ClipboardManager; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.content.Intent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
thread_logger *thl = new_thread_logger(debug_mode); | |
thread_store(create); | |
self_pid = getpid(); | |
sprintf(appendcmd, "ps hH p %d | wc -l > /dev/shm/linkup-varstore/thread_count", self_pid); | |
servsockfd = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in serv_addr; | |
struct sockaddr_in cli_addr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef enum { | |
create, | |
update | |
} THREAD_STORE_OPTION; | |
void thread_store(THREAD_STORE_OPTION opt) { | |
FILE *fptr; | |
if (opt == create) { | |
if(access("/dev/shm/linkup-varstore/thread_count", F_OK) != -1) { // if file doesn't exist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> |