I am having global class "with sharing" and invocable method in that, I am aware that Process Builder runs in system mode, however I am having confusion around the class which is getting called from Process builder will also run in system mode?  The reason I am asking this is because, security scanner suggested me to add CRUD checks in this class, however I want to run all logic in system context, so I am thinking to make it as false positive(I will be updating it to without sharing) Please advise.
123749
I have a basic class with no sharing keyword as I want it to inherit the permissions from callee. What would the context be?  I assume it should run as system (aka without sharing) context, but what I am seeing is opposite. I am getting security exceptions that I shouldn't and fixes by upgrading the class to without sharing.  Is this expected behaviour?
7794
With commands like top and the gui based System Monitor I can see that at the moment I have several zombie processes.  What are zombie processes?  Do they affect the performance of the system or the application they are zombie to. Do they use too much memory or any memory at all?
118493
I'm able to find processes using top or ps. That's no problem.  Sometimes I find that some processes are taking up a lot of memory or cpu and I'm trying to identify what the root program is.  For instance, the process sort sometimes just ends up taking 2-3 gigs of memory over like 4 hours. I'd like to know what program initiated the sort process so I can try and fix it.
112883
says      The /proc/self/ directory is a link to the currently running process.   There are always multiple processes running concurrently, so which process is "the currently running process"?  Does "the currently running process" have anything to do with which process is currently running on the CPU, considering context switching?  Does "the currently running process" have nothing to do with foreground and background processes?
4740
I would like to monitor the following system information in Java:   Current CPU usage** (percent) Available memory* (free/total) Available disk space (free/total)  *Note that I mean overall memory available to the whole system, not just the JVM.   I'm looking for a cross-platform solution (Linux, Mac, and Windows) that doesn't rely on my own code calling external programs or using JNI. Although these are viable options, I would prefer not to maintain OS-specific code myself if someone already has a better solution.  If there's a free library out there that does this in a reliable, cross-platform manner, that would be great (even if it makes external calls or uses native code itself).  Any suggestions are much appreciated.  To clarify, I would like to get the current CPU usage for the whole system, not just the Java process(es).  The SIGAR API provides all the functionality I'm looking for in one package, so it's the best answer to my question so far. However, due it being licensed under the GPL, I cannot use it for my original purpose (a closed source, commercial product). It's possible that Hyperic may license SIGAR for commercial use, but I haven't looked into it. For my GPL projects, I will definitely consider SIGAR in the future.  For my current needs, I'm leaning towards the following:   For CPU usage, OperatingSystemMXBean.getSystemLoadAverage() / OperatingSystemMXBean.getAvailableProcessors() (load average per cpu) For memory, OperatingSystemMXBean.getTotalPhysicalMemorySize() and OperatingSystemMXBean.getFreePhysicalMemorySize() For disk space, File.getTotalSpace() and File.getUsableSpace()   Limitations:  The getSystemLoadAverage() and disk space querying methods are only available under Java 6. Also, some JMX functionality may not be available to all platforms (i.e. it's been reported that getSystemLoadAverage() returns -1 on Windows).  Although originally licensed under GPL, it  to , which can generally be used for closed source, commercial products.
82161
Sometimes I have to use some propriety softwares which I don't trust or even pre-compiled open source ones which I don't know if they've been compiled as their source are.   Lets say we installed a propriety application in /opt/software, then we run it as a normal user (without sudo, gksudo, etc).   I know when we run a program it is able to connect to the Internet, monitor X, keystrokes, collect user data and so on. It can't change anything important in the system or infect the system, (because of the Linux permissions system). It is possible for program to add some plug-in/extension to a user's browser (Because browser profiles are available in user home directory). After closing the program and rebooting it can't do anything anymore. Wrong because:   Program can add itself to a shell/file/directory which does the autostart process, so it will run at any login.  If we consider the autostart process clean, without rebooting there is a chance that a process of the program is still active. Programs can delete or modify any file in the user home directory (or any other file which a user has write permission to).   So what should we do?   I think the only safe way to run a propriety program is running it as another user. If running the program as another user somehow is not possible then we should change the autostart files permission so only root can change them. then after closing the program a reboot will do the job.   Am I right? Is there anything that I'm missing?
47466
I cannot install Eclipse, even if I wanted to.  It is not approved software for my org.  How can test classes be deleted from production, using deployments? There no 'active' checkbox when I am editing the classes in sandbox mode, so I can't just deactivate the test class, and i cant deploy a deleted class to prod...  how the heck is this done?  I dont want to use ANT or special software.  SF must have a native way to achieve this.  And if not...  then I am very disappointed in humanity.
4204
The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design.  Give me scenarios, other than the good old logger where it makes sense to use the singleton.
83816
I have a requirement to hide a process in Task Manager. It is for Intranet scenario. So, everything is legitimate. :)   Please feel free to share any code you have (preferably in C#) or any other techniques or any issues in going with this route.  Update1: Most of the users have admin privileges in order to run some legacy apps. So, one of the suggestion was to hide it in task manager. If there are other approaches to prevent users from killing the process, that would be great.  Update2: Removing the reference to rootkit. Somehow made this post look negative.
21011
If I would have a running virus on my system, would I be able to see the process in taskmanager? I mean, would it be possible for a running virus to circumvent the taskmanager so the process doesn't appear in the tasklist of windows7?  Or in other words. If I really now all the processes in taskmanager to be secure, I also know that my PC is clean?
61579
We are creating custom IDs for Accounts by incrementing an integer field in a custom class. The issue is that if two or more new Accounts are created in close sequence/simultaneously the following code will assign duplicated numbers rather than an incremented number for each:  public static void SetCustomId(Account account) {            CustomObj__c customObj = CustomObj__c.getOrgDefaults();      account.CustomAccountId__c = String.valueOf(Integer.valueOf(customObj.CustomCounter__c));     customObj.CustomCounter__c = customObj.CustomCounter__c + 1;      update customObj; }   Is there a way in Apex to lock a process so that a shared resource is used sequentially? In Java, C#, C++ etc. this is pretty easily done via a critical section if it's a single process or a Mutex if multiple processes access the same resource. Is there anything like this supported in Salesforce? Solutions beside Apex code/triggers would be fine as long as they meet the spec.   EDIT:  It is important that the object creates be sequential and not generate errors due to lockouts.
28344
Is there a way to identify, from within a VM, that your code is running inside a VM?  I guess there are more or less easy ways to identify specific VM systems, especially if the VM has the provider's extensions installed (such as for VirtualBox or VMWare). But is there a general way to identify that you are not running directly on the CPU?
1123
What is the primary difference between the two? I always see this in the right click menu in windows. What happens if you end a process that is relied upon by another process? Is there a way to "kill" a process tree in linux or is the technology different?
84046
Our application uses an init.d script to start and stop the application as a service. Under CentOS 7, /sbin/init is symlinked to systemd, so I can start my application using either:  service myapp start   or   systemctl start myapp   The issue I am having is that running stop on the service using either service or systemctl will not stop my application. The output of systemctl status:  [root@nec04 ~]# systemctl status myapp myapp.service - SYSV: Service script to start/stop my application    Loaded: loaded (/etc/rc.d/init.d/myapp)    Active: inactive (dead) since Mon 2015-10-05 15:17:41 CEST; 22h ago   Process: 31850 ExecStop=/etc/rc.d/init.d/myapp stop (code=exited, status=0/SUCCESS)   Process: 21054 ExecStart=/etc/rc.d/init.d/myapp start (code=exited, status=0/SUCCESS)   Using the service command:  [root@nec04 ~]# service myapp status Local database at :3307 is started Watchdog is running Application is running   Why does systemctl think my application is not running? Could it be that systemctl is not calling the stop function because it thinks my application is already stopped?
109235
I need to do some analysis on process builder for taking a decision on config vs coding.  Saying that process builder is the alternate for the Triggers for updating the child records.    After creating some processes I noticed the following.  1) It can update the child records after meeting a condition on the parent record.   --> Here my observation is what if we need to update only specific child records, that means we are running out of options in this case we can not exert conditions at child record level.  --> So far I came across the couple of posts on bulk update or inserts issues with the process builder. for reference   .    So here I would like to submit my analysis as process builder is not the complete alternate for the triggers since it has limitations on updating or inserting child records and also in doing the bulk updates/inserts.  My question is I am I analysing the right way or missing some thing and if there is any thing more can i add to it.
45838
If I have the following code:  MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass = null;   Will pClass be garbage collected? Or will it hang around still firing its events whenever they occur? Will I need to do the following in order to allow garbage collection?  MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass.MyEvent -= MyFunction; pClass = null;
55978
I have a Process Builder flow set up and I am running some tests around the InvocableMethod Apex code. The tests pass fine in my staging and production environments. Yet, when I try to deploy to production, I get a strange error.  CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow.  Thankfully I received a somewhat more informative error email.  UPSERT FAILED ---  ERRORS :  (CANNOT_EXECUTE_FLOW_TRIGGER) The record couldn’t be saved because it failed to trigger a flow. common.exception.AssertionException: ORA-20070: Cannot read from apex_class and apex_trigger while running tests ---  for SFDC record with ID : null,  Unfortunately, the deployment has nothing to do with the flow and it is unclear why it is failing. What is the root cause of this error and how can I fix it? EDIT: I found out this is a . The other claimed workaround is to deploy via the Metadata API. UPDATE: Because I was subscribed to the Known Issue, I received the following confirmation this issue is resolved.  We are pleased to notify you that the following Known Issue has been resolved: Executing an InvocableMethod during an apex test run from a change set can cause Errors. Thank you for being patient while we worked to address this issue. Please feel free to reach out to Customer Support if you have further questions. Sincerely, Salesforce Success Team